fore_optics_flat

jwst.flatfield.flat_field.fore_optics_flat(wl, f_flat_model, exposure_type, dispaxis, slit_name, slit_nt)[source]

Extract the flat for the fore optics part.

Parameters:
wlndarray

Wavelength at each pixel of the 2-D slit array.

f_flat_modelNirspecFlatModel, NirspecQuadFlatModel, or None

Flat field for the fore optics.

exposure_typestr

The exposure type refers to fixed_slit, IFU, or MSA.

dispaxisint

1 means horizontal dispersion, 2 means vertical dispersion.

slit_namestr or None

The name of the slit currently being processed.

slit_ntnamedtuple or None

For MOS data (only), this is used to get the quadrant number and the indices of the current shutter in the Y and X directions.

Returns:
f_flatndarray of float32

The computed flat field for the fore optics.

f_flat_dqndarray of uint32

The associated data quality array.

f_flat_errndarray of float32 or None

The associated error array.