;+ ; NAME: ; nagoya_r_fitting ; CALLING SEQUENCE: FUNCTION nagoya_r_fitting, ppdist, scindx, min_ppdist ; INPUTS: ; ppdist array[n]; type: float ; "point-P" distance of lines of sight ; scindx array[n]; type: float ; scintillation index ; min_ppdist scalar; type: float ; only data point with point-P distance ; larger than min_ppdist are used in the fit ; INCLUDE: @compile_opt.pro ; On error, return to caller ; PROCEDURE: ; Fits scintillation index to a power low function of the point-P ; distance: ; scindx = 10^a[0] * ppdist^a[1] ; = 10^( a[0] + a[1]*alog10(ppdist) ) ; ; alog10(scindx) = a[0] + a[1]*alog10(ppdist) ; MODIFICATION HISTORY: ; AUG-2009, Paul Hick (UCSD/CASS) ; Added documentation ;- mm = 2 ; Need at least 3 points ii = where(ppdist GT min_ppdist AND scindx GT 0.0, cnt) RETURN, cnt GT mm ? svdfit(alog10(ppdist[ii]),alog10(scindx[ii]),mm) : [0.0,0.0] END