do_flat_field

jwst.flatfield.flat_field.do_flat_field(output_model, flat_model, inverse=False)[source]

Apply image-based flat-fielding, updating the output model.

This method uses a simple flat field image to correct the input. It is used for all exposure types except NIRSpec spectroscopic modes, which require a composite flat field.

Parameters:
output_modelJwstDataModel

Flat-fielded input science data model, modified in-place.

flat_modelJwstDataModel

Data model containing flat-field.

inversebool, optional

Invert the math operations used to apply the flat field.