do_correction

jwst.barshadow.bar_shadow.do_correction(input_model, barshadow_model=None, inverse=False, source_type=None, return_corrections=True)[source]

Correct MSA data for bar shadows.

Parameters:
input_modelMultiSlitModel

Science data model to be corrected. Updated in place.

barshadow_modelBarshadowModel, optional

Bar shadow data model from reference file.

inversebool, optional

Invert the math operations used to apply the flat field.

source_typestr or None, optional

Force processing using the specified source type.

return_correctionsbool, optional

If True, a model containing the applied corrections is returned.

Returns:
input_modelMultiSlitModel

Science data model with correction applied and barshadow extensions added.

correctionsMultiSlitModel, optional

A model of the correction arrays, returned if return_corrections is True.