PRO LINECURV2,spectr,a,b,c ; ; Coefficients of parabola describing the curvature of spectral lines ; INPUTS: SPECTR - 2D array with spectrum ; OUTPUTS: A, B, C - coefficients of parabola a + bx + cx^2 ; ; Copyright M. Klvana and M. Sobotka, ASU AVCR Ondrejov, Czech Rep., 2008 ; si = size(spectr) pts=lonarr(2,3) ;array of 3 initial points pts(1,0)=long(0.2*si(2)) pts(1,1)=long(0.5*si(2)) pts(1,2)=long(0.8*si(2)) for j=0,2 do begin mi=min(spectr(*,pts(1,j)),pos) pts(0,j)=pos endfor ;parabola estimate ; formula: position_x = par0(0)+par0(1)*y+par0(2)*y^2 par0=poly_fit(pts(1,*),pts(0,*),2) xmin=fltarr(si(2)) ;search for spectral line minima in all rows for j=0,si(2)-1 do begin x0=par0(0)+par0(1)*j+par0(2)*j*j ll=x0-5>0 ul=x0+5