PRO LINERECT,spectr,a,b,c,rectspe,x0 ; ; Rectification of spectral curvature ; INPUT: SPECTR - 2D array with original spectrum ; A, B, C - coefficients of the parabola ; OUTPUTS: RECTSPE - rectified spectrum ; x0 - position of the line ; ; Copyright M. Klvana and M. Sobotka, ASU AVCR Ondrejov, Czech Rep., 2008 ; si=size(spectr) y=findgen(si(2)) x=a+b*y+c*y^2 ;calculate curvature parabola x0=x(si(2)/2) ;set zero in the middle of FOV shft=x-x0 ;array of curvature shifts rectspe=float(spectr) for j=0,si(2)-1 do begin xx=findgen(si(1))+shft(j) rect=interpolate(float(spectr(*,j)),xx) rectspe(*,j)=rect endfor END