check.fits


display range: 0,20000
  • Correct the distortion along y-axis for
    the left- and right-hand side separately
    based on irs1_flat_lre1.dat and irs1_flat_lre2.dat
  • Merge the images to check the correction
    accuracy
#Deformation and extract spectra
imdel irs1_flat_lre.fits,irs1_flat_lrs.fits,irs1_flat_lra.fits,irs1_flat_lrx.fits,check,bkg
!echo "0.5 1 1 1 1 1 1 1 0.5" > extract.dat
imdel tmp2,tmp2a,tmp3a,tmp4a
imcopy irs1_flat_lrm[1:1024,*] tmp2.fits
!../extract tmp2.fits tmp2a.fits irs1_cont_lre1.dat 0
imrename check tmp3a
imrename bkg tmp4a
imdel tmp2,tmp2b,tmp3b,tmp4b
imcopy irs1_flat_lrm[1025:2048,*] tmp2.fits
!../extract tmp2.fits tmp2b.fits irs1_cont_lre2.dat 0
imrename check tmp3b
imrename bkg tmp4b
!echo "0 0" > tmp.offset
!echo "1024 0" >> tmp.offset
imcomb tmp2a,tmp2b irs1_flat_lre.fits offset=tmp.offset
imcomb tmp3a,tmp3b check.fits offset=tmp.offset
imcomb tmp4a,tmp4b bkg.fits offset=tmp.offset
displ check 4 zs+