function pset, datestr, indx0, n, sec, rditime, noscale=noscale d = rdset(datestr, indx0, n, h, dateobs=dateobs, utc=utc, rditime=rditime) sec = raparse(utc) * (12.*3600)/!pi + rditime/2. p = fltarr(n) xc = 306 yc = 287 w = 10 for i = 0, n-1 do begin v = d[xc, yc-w:yc+w, i] x = farrgen(-w,w,1.) vfit = gaussfit(x, v, res, nterm=4) ; print, res if keyword_set(noscale) then p[i] = res[0] else p[i] = res[0] / rditime[i] ; plot, x, v, ps=10, title = string(i)+' of '+string(n) ; oplot, x,vfit ; wait, 2 endfor ; plot, (sec-sec[0])/60., p/p[0], ps=-2 return, p ; Fit the equation y=f(x) where: ; ; F(x) = A0*EXP(-z^2/2) + A3 + A4*x + A5*x^2 ; and ; z=(x-A1)/A2 ; ; A0 = height of exp, A1 = center of exp, A2 = sigma (the width). ; A3 = constant term, A4 = linear term, A5 = quadratic term. ; Terms A3, A4, and A5 are optional. ; The parameters A0, A1, A2, A3 are estimated and then CURVEFIT is ; called. end