bkg_for_container

jwst.master_background.expand_to_2d.bkg_for_container(input_data, tab_wavelength, tab_background, allow_mos=False)[source]

Create a 2-D background for a container object.

Parameters:
input_dataAssociation or ModelContainer

The input science data.

tab_wavelengthndarray

The wavelength column read from the 1-D background table.

tab_backgroundndarray

The surf_bright column read from the 1-D background table.

allow_mosbool

If True, NIRSpec MOS data is supported. If False, background is set to 0.0 for any slit marked as exposure type NRS_MSASPEC. This parameter should be set to True only for the master_background_mos step in the spec2 pipeline; MOS data is not supported via the master_background step in the spec3 pipeline.

Returns:
backgroundModelContainer

A copy of input_data but with the data replaced by the background, “expanded” from 1-D to 2-D.