tmpscr(1/2): mask.fits
 |
display range: 1,0
- Make a mask for the highest 30000
random badpixels with a "cross" kernel
|
displ irs1_sample1a1_lrxp 2 zs+
imdel tmp0,tmp1,mask,irs1_sample1a1_lrxpb.fits
fit1d irs1_sample1a1_lrxp tmp0 fit axis=1 inter- function=legendre order=1 high_reject=2 low_reject=2 niterate=5 grow=0
imfunc tmp0 tmp0 abs
imarith tmp0 / 10 tmp0
imrepl tmp0 1. upper=1
imfunc tmp0 tmp0 sqrt
imarith irs1_sample1a1_lrxp / tmp0 tmp0
fit1d tmp0 tmp0 difference axis=1 inter- function=spline3 order=20 high_reject=2 low_reject=2 niterate=5 grow=0
median tmp0 tmp1 3 3
imarith tmp0 - tmp1 tmp1
imfunc tmp1 tmp1 abs
imrepl tmp1 6500. lower=6500.
!rm tmp.tbl tmp1.tbl
imhist tmp1 z1=-0.05 z2=6500.05 binwidt=0.1 nbins=65001 hist_type=cumulative listout+ > tmp.tbl
!../thresh tmp.tbl 30000 tmp1 > tmp1.tbl
cl < tmp1.tbl
imstati tmp1 upper=0.5
convolve tmp1 tmp1 "0. 0.2 0.; 0.2 0.2 0.2; 0. 0.2 0."
imrepl tmp1 0. upper=0.9
imcopy tmp1 mask.fits
displ mask 1 zs- zr- z1=1 z2=0