create_background_from_multispec

jwst.master_background.nirspec_utils.create_background_from_multispec(bkg_model, sigma_clip=3, median_kernel=1)[source]

Create the background spectrum from multiple input spectra.

Create a 1D master background spectrum from a set of calibrated background MOS slitlets in the input MultiSpecModel.

Parameters:
bkg_modelMultiSpecModel

The input data model containing all slit instances.

sigma_clipNone or float, optional

Optional factor for sigma clipping outliers when combining background spectra.

median_kernelint, optional

Optional user-supplied kernel with which to moving-median boxcar filter the master background spectrum. Must be an odd integer, even integers will be rounded down to the nearest odd integer.

Returns:
master_bkgCombinedSpecModel

The 1D master background spectrum created from the inputs.

x1dMultiSpecModel

The 1D extracted background spectra of the inputs.