I-3. Revising the Default Bad-pixel Masks

Mosaic data has a default set of bad pixel masks, which include the gaps between chips, and not much else. The location of these bad pixel masks can be inferred from the raw data headers; likely they are somewhere in mscdb$noao/CCDMosaThina/CALXXXX (KPNO) or mscdb$noao/Mosaic2/CALXXXX/bpm. What we do is copy these into local files "bpnkpno1.pl", "bpnkpno2.pl", etc., and then modify them painfully by hand.

We begin by dividing a short exposure by a long exposure dome flats, and displaying the results with the default bad pixel map overlayed. We then identify bad columns and rows and update the bad pixel maps accordingly, using "imreplace", i.e.,

imreplace bpnkpno1.pl[431:431,3631:3631] 1. (to indicate a bad pixel) and
imreplace bpnkpno2.pl[1354:1354,1:4096] 1. (to indicate a bad column)

Now, we need to make sure that we actually will USE these bad pixel masks:

hedit *.fits[1] BPM bpnkpno1.pl veri- show+
hedit *.fits[2] BPM bpnkpno2.pl veri- show+
hedit *.fits[3] BPM bpnkpno3.pl veri- show+
hedit *.fits[4] BPM bpnkpno4.pl veri- show+
hedit *.fits[5] BPM bpnkpno5.pl veri- show+
hedit *.fits[6] BPM bpnkpno6.pl veri- show+
hedit *.fits[7] BPM bpnkpno7.pl veri- show+
hedit *.fits[8] BPM bpnkpno8.pl veri- show+