flag_saturation

jwst.saturation.saturation.flag_saturation(output_model, ref_model, n_pix_grow_sat, use_readpatt, bias_model=None)[source]

Call function in stcal for flagging for saturated pixels.

Parameters:
output_modelRampModel

The input science data to be corrected.

ref_modelSaturationModel

Saturation reference file data model.

n_pix_grow_satint

Number of layers of pixels adjacent to a saturated pixel to also flag as saturated (i.e., ‘1’ will flag the surrounding 8 pixels) to account for charge spilling.

use_readpattbool

Use grouped read pattern information to assist with flagging.

bias_modelSuperBiasModel or None, optional

Superbias reference file data model.

Returns:
output_modelRampModel

Data model with saturation, A/D floor, and do not use flags set in the GROUPDQ array.