flag

jwst.msaflagopen.msaflag_open.flag(input_datamodel, failed_slitlets, wcs_refnames)[source]

Flag slitlet regions for failed open shutters.

Takes the list of failed open shutters from the failedopen reference file and calculates the pixels affected using the WCS model. The affected pixels in the science data have their DQ flags combined with that for the MSA_FAILED_OPEN standard flag. All other science data arrays are unchanged.

The input datamodel is modified in-place.

Parameters:
input_datamodelJwstDataModel

Input science data. Updated in-place.

failed_slitletslist of Slit

Failed open slitlets.

wcs_refnamesdict

Reference file names used to calculate the WCS. Keys are reference file types; values are file paths.

Returns:
input_datamodelJwstDataModel

Science data with DQ flags modified.