next up previous 306
Next: Readnoise Variance
Up: Bad pixels
Previous: Bad pixels


Creating a bad-pixel mask

The easiest way to create your own bad-pixel mask for use with the calibration system, is to run the MAKE_BPM recipe on a long-exposure dark (at least 20 seconds integration). It is possible to change the symmetric $\sigma$-clipping bounds in the recipe (see primitive _MAKE_BPM_BY_SIGMA_THRESHOLDING_). You can tailor this primitive if you want more control, say to have asymmetric rejection or more sophisticated definitions.
[_MAKE_BPM_BY_SIGMA_THRESHOLDING_]

For better results, use the average of long dark frames taken across two or three nights. First, produce QUICK_LOOK versions of the long-exposure dark to flatten the NDF structure or convert the FITS file. Flag all pixels that are 5 standard deviations ($\sigma$) above and below the 3-$\sigma$ clipped mean of the dark as ``bad'', then multiply the resulting frame by zero so that the resulting bad-pixel mask has data values of 0 and bad only. You can choose your own thresholds. Here is an example, using data from two nights of CGS4 data and Starlink software.

 % oracdr_cgs4 20010101
 % setenv ORAC_DATA_OUT `pwd`
 % oracdr -list 4:4 QUICK_LOOK -nodisplay
 % oracdr_cgs4 20010102
 % setenv ORAC_DATA_OUT `pwd`
 % oracdr -list 4:4 QUICK_LOOK -nodisplay
 
 % kappa
 % add c20010101_00004_mraw c20010102_00004_mraw add_darks
 % cmult add_darks 0.5 av_darks
 % stats av_dark clip=3
 % thresh av_darks av_darks_thresh -49 58 bad bad
 % cmult av_darks_thresh 0 avbpm title=\"CGS4 bpm, January 2001\"

In the above example the 3-$\sigma$ clipped mean was 4.27 and the standard deviation was 10.727, resulting in -49 and 58 as the lower and upper thresholds.

Then you specify the bad-pixel mask on the command line.

 % oracdr -calib mask=avbpm ...

UIST has its own slightly different formula; see DARK_AND_BPM for details

[UIST/_FIND_BAD_PIXELS_, UIST/_FILE_BAD_PIXELS_, _FILE_MASK_]



next up previous 306
Next: Readnoise Variance
Up: Bad pixels
Previous: Bad pixels

ORAC-DR -- spectroscopy data reduction
Starlink User Note 236
Paul Hirst
Brad Cavanagh
Joint Astronomy Centre, Hilo, Hawaii
October 2005
E-mail:ussc@star.rl.ac.uk

Copyright © 2005 Particle Physics and Astronomy Research Council