FUNCTION DSKC,sphe,xdiam,ydiam,shft,xc,yc ; ; Rectification of a spectroheliogram SPHE, using input parameters ; xdiam,ydiam,shft,xc,yc, calculated by DISKCOR3. ; Returned: Corrected spectroheliogram ; M. Sobotka, ASU ASCR, 2017 ; si=size(sphe) sph=sphe aspect=float(ydiam)/float(xdiam) ;current aspect ratio ; making the Sun roundish - correction of the x-diameter sph=congrid(sph,round(si(1)*aspect),si(2),cubic=(-0.5)) si=size(sph) ; new size ; correction for entrance slit curvature sph2=sph for j=0,si(2)-1 do begin xx=findgen(si(1))+shft(j) rect=interpolate(sph(*,j),xx) sph2(*,j)=rect endfor ; shift the centroid to the centre of image sphcor=shift(sph2,si(1)/2-xc,si(2)/2-yc) RETURN,sphcor END