tmp0.fits


display range: 0,40000
#Dome Flat
imdel tmp0,tmp1,tmp2,tmp3,mask,mask2,irs1_cont_lrm.fits
imarith irs1_cont_lr.fits / ../flat tmp2
fit1d tmp2 tmp3 fit axis=2 inter- function=legendre order=1 high_reject=2 low_reject=2 niterate=5 grow=0
imrepl tmp3 2000 upper=2000
median tmp3 tmp3 300 1
imarith tmp2 / tmp3 tmp3
imarith tmp3 * 10000. tmp0.fits
displ tmp0 1 zs+