expand_to_2d

jwst.master_background.expand_to_2d.expand_to_2d(input_data, m_bkg_spec, allow_mos=False)[source]

Expand a 1-D background to 2-D.

Parameters:
input_dataJwstDataModel

The input science data.

m_bkg_specstr or JwstDataModel

Either the name of a file containing a 1-D background spectrum, or a data model containing such a spectrum.

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:
backgroundJwstDataModel

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