autowisp.image_calibration.mask_utilities module
Class Inheritance Diagram

A collection of functions for working with masks.
- autowisp.image_calibration.mask_utilities.mask_flags
Dictionary contaning the possible bad pixel flags and the corresponding bitmasks.
- autowisp.image_calibration.mask_utilities.combine_masks(mask_filenames)[source]
Create a combined mask image from the masks of all input files.
- Parameters:
mask_filenames – A list of FITS filenames from which to read mask images (identified by the IMAGETYP header keyword matching [a-z_]*mask). Or a single filename.
- Returns:
A bitwise or of the mask extensions of all input FITS files.
- Return type:
numpy.array(dtype=uint8)
- autowisp.image_calibration.mask_utilities.get_saturation_mask(raw_image, saturation_threshold, leak_directions)[source]
Create a mask indicating saturated and leaked into pixels.
- Parameters:
raw_image – The image for which to generate the saturation mask.
saturation_threshold – The pixel value which is considered saturated. Generally speaking this should be where the response of the pixel starts to deviate from linear.
leak_directions – Directions in which charge overflows out of satuarted pixels. Should be a list of 2-tuples giving the x and y offset to which charge is leaked.
- Returns:
A bitmask array flagging pixels which are above saturation_threshold or which are adjacent from a saturated pixel in a direction in which a charge could leak.
- Return type:
numpy.array(dtype=uint8)