do_nirspec_flat_field

jwst.flatfield.flat_field.do_nirspec_flat_field(output_model, f_flat_model, s_flat_model, d_flat_model, user_supplied_flat=None, inverse=False)[source]

Apply flat-fielding for NIRSpec spectroscopic data, updating in-place.

Calls one of 3 functions depending on whether the data is:

  1. NIRSpec IFU,

  2. NIRSpec BRIGHTOBJ, or

  3. NIRSpec MSA or Fixed Slit.

Parameters:
output_modelJwstDataModel

Science data model, modified (flat fielded) in-place.

f_flat_modelNirspecFlatModel, NirspecQuadFlatModel, or None

Flat field for the fore optics.

s_flat_modelNirspecFlatModel or None

Flat field for the spectrograph.

d_flat_modelNirspecFlatModel or None

Flat field for the detector.

user_supplied_flatJwstDataModel or None, optional

If provided, override all other calculated or reference-file-retrieved flat information and use this data.

inversebool, optional

Invert the math operations used to apply the flat field.

Returns:
resultMultiSlitModel or ImageModel

The interpolated flat field(s).