OpenPixelStep#

snowblind.OpenPixelStep, run with strun open_pixel. Finds open and hot pixels that have appeared since the reference bad-pixel mask was made, by comparing the calibrated exposures of each detector. Experimental. Guide: Snowball, jump and open-pixel flagging.

Parameters:
thresholdfloat, default 3.0

threshold in sigma to flag hot pixels above local background

save_maskboolean, default False

write out per-detector bad-pixel mask and median

flag_low_signal_pix : boolean, default False

The parameters every stpipe step has (skip, save_results, output_dir, suffix, pre_hooks, post_hooks and the others) are described in the stpipe documentation.

class snowblind.OpenPixelStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)#

Flags cross-shaped and hot pixel defects caused by open pixels in NIR detectors

Input is an assocation (or glob pattern of files) of all images in visit or program ID on which ones wishes to do a self-cal. These are split into separate detector stacks, and then each image in the stack is operated on by the median of the images in that stack. So input is N images, and output is N images, much like the first steps of stage 3 pipelines such as tweakreg, skymatch and outlier detection.

Like outlier_detection, the input and output science images are the same, and only the data quality (DQ) array has new pixels flagged as DO_NOT_USE and ADJ_OPEN.

This should be run after flatfielding is finished in image2 pipeline. It is fine to insert it anywhere in the level3 pipeline before resample.

process(input_data)#

Flag hot (and optionally low-signal) pixels found in the per-detector median image.

Parameters:
input_datastr or ModelContainer

Association file or container of image datamodels (_rate or _cal products) with data and dq arrays of shape (nrows, ncols). The models are grouped by meta.instrument.detector; a mask is made from the median of each group and applied to every member of that group. With self.save_mask the mask and the median image of each detector are saved with the mask and median suffixes.

Returns:
ModelContainer

Copy of the input with DO_NOT_USE | ADJ_OPEN set in dq on the flagged pixels; the science data are unchanged.