| warmpix | stsdas.hst_calib.wfpc | warmpix |
warmpix -- Flag and/or correct hot pixels in WFPC2 images
warmpix input masks tables rej_thresh fix_thresh var_thresh
This task flags and/or fixes hot pixels in an image. It requires an input table(s) containing the locations and dark counts for hot pixels that existed around the time of the observations. Each table typically spans an interval of time between decontaminations, and contains hot pixel data derived from dark files taken at several epochs within that period.
"warmpix" will do the following:
(1) If a hot pixel has high (or highly variable) dark counts, the pixel value in the science image remains unchanged, unless the parameter "rej_val" is set. The corresponding pixel in the image's data quality file (DQF) will have its 10th least significant bit set to indicate that it is a "bad" pixel (i.e. logically OR'ed with 512).
(2) If the hot pixel has a moderate dark count, its value can be fixed in the image. A modified dark value is calculated by extrapolating the hot pixel's value between two epochs that cover the time of observation for the image. In addition, the corresponding pixel in the image's DQF has its 11th least significant bit set (i.e. logically OR'ed with 1024) to indicate that the pixel value was modified, unless the parameter "fix_dqval" is set to a different value.
(3) If a pixel has a low dark count, its value and its data quality pixel are not modified.
CHIP detector number, from 1 to 4 (short). X X coordinate of the hot pixel (short). Y Y coordinate of the hot pixel (short). EPOCH time when the dark measurement(s) was taken, in MJD (double). DARK dark count measured at EPOCH, in DN/sec (real). A value of -100 indicates when a decontamination was performed.
The table must also be sorted in the following order: CHIP, Y, X, EPOCH. Tables downloaded from STScI's WFPC2 Documentation web page are sorted properly.
Since sorting large tables are very time consuming, we encourage using only one table to process file(s) covering the epoch range of the table, instead of using multiple tables to process many files covering a wide range of epochs.
Pixels with dark counts that fall between the "fix_thresh" value and the "rej_thresh" value will be fixed. But the fix will only occur if the difference between the hot pixel values before and after the observation is less (in absolute value) than the "var_thresh" parameter value. A new dark value will be calculated using the hot pixel table, and the science image pixel will be modified accordingly.
If the dark and flat field reference files used to calibrate the science image (as specified in its header) are available, the calibrated pixel value will be recalculated, using the new dark value. If they are not available, the old dark will be assumed to be 0 and the old flat field will be assumed to be 1.
The data quality pixel corresponding to the "fixed" image's hot pixel will be logically OR'ed by the value specified by the parameter FIX_DQVAL (see below).
1. Fix hot pixels in images a.c0h and b.c0h (that are accompanied by their data quality files a.c1h and b.c1h) using the hot pixel tables hp1.tab and hp2.tab.
wf> warmpix "a.c0h,b.c0h" "a.c1h,b.c1h" "hp1.tab,hp2.tab" 0.1 0.003 0.003