apply_flat_field
- jwst.flatfield.flat_field.apply_flat_field(science, flat, inverse=False)[source]
Flat field the data and update error and variance arrays.
The science data is divided by the flat field. The data quality array is updated based on bad pixels in flat field arrays. Error and variance arrays are propagated appropriately.
Applies the portion of the flat field corresponding to the science image subarray.
- Parameters:
- science
JwstDataModel Input science data model.
- flat
JwstDataModel Flat field data model.
- inversebool, optional
Invert the math operations used to apply the flat field.
- science