redproc_common


Outline

Items Start End
Extract distortion & position parameters from "cont" image
&
Parameter files
Make reduced "flat" image to correct the different spectral feature among fibers
Obtain pixel-wavelength correlation from reduced "ar" image

### Dome Flat ###
!../headerinfo ./ 1
imdel tmp1,tmp2,tmp3
imcomb FMSA00004055[0],FMSA00004057[0],FMSA00004059[0] tmp1
imcomb FMSA00004061[0] tmp2
imcomb FMSA00004063[0],FMSA00004065[0],FMSA00004067[0],FMSA00004069[0],FMSA00004071[0],FMSA00004073[0] tmp3
imarith tmp2 - tmp1 irs1_ar_lr.fits
imarith tmp3 - tmp1 irs1_flat_lr.fits
imcopy irs1_flat_lr.fits irs1_cont_lr.fits
#"irs1_cont_lr.fits" is the fixed name.
!sed -e 's/BAND/lr/g' ../redscr0s > tmpscr
# If you want to increase the speed of fitting by multi-core CPUs...
#!sed -e 's/BAND/lr/g' ../redscr0s | sed -e 's/extract /extract_multi /g' > tmpscr
cl < tmpscr
!sed -e 's/FMSAfileno/irs1_flat_lr/g' ../redscr1s | sed -e 's/BAND/lr/g' | sed -e 's/SHIFT/0/g' > tmpscr
cl < tmpscr

### CAL Lamp ###
!sed -e 's/FMSAfileno/irs1_ar_lr/g' ../redscr1s | sed -e 's/BAND/lr/g' | sed -e 's/SHIFT/0/g' > tmpscr
cl < tmpscr
imdel tmp1
median irs1_ar_lra tmp1.fits 1 21 boundar=reflect
imdel check,irs1_ar_lrw.fits
!../wlmap tmp1.fits irs1_ar_lrw.fits ../ThAr.dat 0.001 1.371 0.470 -0.028 0.004
#If fluorescent lamps are used intead of ThAr lamp...
#!../wlmap tmp1.fits irs1_ar_lrw.fits ../FL_lamp.dat 0.001 1.371 0.470 -0.028 0.004
#Wavelength[um]=wcen+dw*x+dw2*x^2+dw3*x^3 (x=-1 to 1 from left to right)
#    step  wcen  dw    dw2    dw3
#js: 0.001 1.011 0.121 -0.001 0.000
#jm: 0.001 1.125 0.120 -0.001 0.000
#jl: 0.001 1.238 0.118 -0.001 0.000
#hs: 0.001 1.502 0.111 -0.002 0.000
#hm: 0.001 1.607 0.108 -0.002 0.000
#hl: 0.001 1.713 0.105 -0.002 -0.001
#lr: 0.001 1.371 0.470 -0.028 0.004
displ tmp1 1 zs+
displ check 2 zs- zr+
#Compair these two images (read data / model) to make sure the conversion is not failed.
#Reduce "step" parameter to restrict the initial search range to a narrower one.
#Change "wcen" and "dw" parameters to shift and enlarge the model image, respectively.
displ irs1_ar_lrw 3 zs- zr+
#The image gives the wavelength at each pixel.