For the purposes of constructing our photometric catalogs, we are being
relatively fussy---which you need to be if you want to get 1% photometry
out. First, we explictly set any data value which was "fixpixed" to
a value of 50000 so that our photometry routine knows to ignore it.
Secondly, we conduct the photometry separtely on each chip of each
dithering. This is 40 times more work (8 chips x 5 ditherings) but it
means we can then apply the photometric transformations correctly, as there
are significant color-term difference from one chip to another. There
are also small zero-point shifts from chip to chip, coupled to these
color-term difference and the fact that neither sky-flats nor dome-flats
are the same color as all the stars in our galaxies. Finally, the point
spread functions are different from chip to chip, unsurprising as a focus
exposure shows focus differences from chip to chip, and we had to compromise.
We have bad pixel masks for our "fobjXXX.fits" frames, but none of the photometry routines know anything about these. So, we will set all bad pixels to a datavalue of 50,000, and make sure that the photometry routines know to reject such high values from our data.
To this we invoke the following incantation; we are grateful for guidance
from Frank Valdes for this:
cl> imexpr "b != 0 ? 100000 : a" outimage inimage inmask
where the last three things are the output image, the input image, and
the bad pixel mask corresponding to the input mask.
In order to apply this to all of our images in one shot, we use the following
script:
imexpall.cl: # Written by Phil Massey, Lowell Obs. 11/01/01 #This uses the bad pixel mask "fobjXXX_bmp.pl" to set all the bad pixels #in fobjXXX.fits to 50000. delete tdump files fobj*%.fits%% > tdump list="tdump" while(fscan(list,s1)!=EOF) { imexpr("b != 0 ? 50000 : a","f"//s1//".fits",s1//".fits",s1//"_bpm.pl") }