do_correction
- jwst.flatfield.flat_field.do_correction(input_model, flat=None, fflat=None, sflat=None, dflat=None, user_supplied_flat=None, inverse=False)[source]
Flat-field a JWST data model using a flat-field model.
- Parameters:
- input_model
JwstDataModel Input science data model to be flat-fielded. Updated in place.
- flat
JwstDataModelor None, optional Data model containing flat-field for all instruments other than NIRSpec spectrographic data.
- fflat
NirspecFlatModel,NirspecQuadFlatModel, or None, optional Flat field for the fore optics. Used only for NIRSpec data.
- sflat
NirspecFlatModelor None, optional Flat field for the spectrograph. Used only for NIRSpec data.
- dflat
NirspecFlatModelor None, optional Flat field for the detector. Used only for NIRSpec data.
- user_supplied_flat
JwstDataModelor None, optional If supplied, all other reference flats and flat creation are ignored in favor of the specified flat.
- inversebool, optional
Invert the math operations used to apply the flat field.
- input_model
- Returns:
- input_model
JwstDataModel The updated data model with flat-fielded science data.
- flat_applied
MultiSlitModelorImageModel Data model containing the interpolated flat fields (NIRSpec data only), or just the input flat.
- input_model