subtract_wfss_bkg

jwst.background.background_sub_wfss.subtract_wfss_bkg(model, bkg_filename, wl_range_name, mmag_extract=None, user_mask=None, rescaler_kwargs=None)[source]

Scale and subtract a background reference image from WFSS/GRISM data.

Parameters:
modelImageModel

Copy of input target exposure data model.

bkg_filenamestr

Name of master background file for WFSS/GRISM.

wl_range_namestr

Name of wavelength range reference file.

mmag_extractfloat or None, optional

Minimum AB mag of grism objects to extract. Default: None

user_maskndarray[bool] or None, optional

User-supplied boolean source mask. True for background, False for pixels that are part of sources. If provided, will supersede the auto-generated mask from the source catalog, and model.meta.source_catalog will be ignored entirely. Default: None

rescaler_kwargsdict or None, optional

Keyword arguments to pass to ScalingFactorComputer. Default: None

Returns:
resultImageModel

Background-subtracted target data model.