combine_fast_slow

jwst.flatfield.flat_field.combine_fast_slow(wl, flat_2d, flat_dq, flat_err, tab_wl, tab_flat, tab_flat_error, dispaxis)[source]

Multiply the image by the tabular values.

Parameters:
wlndarray

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

flat_2dndarray or float

The flat field derived from the image part of the reference file, or a scalar (e.g., 1.0) if there is no image part in the current reference file.

flat_dqndarray or None

If not None, the data quality array corresponding to flat_2d. A copy of this will be updated with flags which may be set based on the fast-variation component, and the updated array will be returned.

flat_errndarray or None

If not None, the error array corresponding to flat_2d. A copy of this will be updated with errors added in quadrature from the fast-variation component, and the updated array will be returned.

tab_wlndarray

1D wavelengths corresponding to tab_flat.

tab_flatndarray

The 1D flat field from the table part of the reference file. This is the “fast” variation of the flat, i.e., fast with respect to wavelength.

tab_flat_errorndarray

The 1D flat field error from the table part of the reference file.

dispaxisint

1 is horizontal, 2 is vertical.

Returns:
combined_flatndarray of float32

The 2D product of flat_2d and the values in tab_flat interpolated to the wavelengths of the science image, i.e., wl.

combined_dqndarray of uint32

The updated data quality array corresponding to flat_2d. If a pixel wavelength is less than or equal to zero, or if it’s not within the range of tab_wl, NO_FLAT_FIELD will be used to flag this condition, and the fast-variation flat field value at that pixel will be set to 1.

flat_errorndarray of float32

The tab_flat_err values interpolated to the 2D wavelengths of the science image, i.e., wl. Missing values are set to 0.