BackgroundStep

class jwst.background.BackgroundStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)[source]

Bases: JwstStep

Subtract background exposures from target exposures.

Create a Step instance.

Parameters:
namestr

The name of the Step instance. Used in logging messages and in cache filenames. If not provided, one will be generated based on the class name.

parentStep

The parent step of this step. Used to determine a fully-qualified name for this step, and to determine the mode in which to run this step.

config_filestr or pathlib.Path

The path to the config file that this step was initialized with. Use to determine relative path names of other config files.

_validate_kwdsbool

Validate given kws against specs/config.

**kwsdict

Additional parameters to set. These will be set as member variables on the new Step instance.

Attributes Summary

bkg_suffix

class_alias

reference_file_types

spec

Methods Summary

process(step_input[, input_bkg_list])

Subtract designated background images from target exposures.

Attributes Documentation

bkg_suffix = 'combinedbackground'
class_alias = 'bkg_subtract'
reference_file_types: ClassVar = ['bkg', 'wavelengthrange']
spec = '\n        bkg_list = force_list(default=None)  # List of background files. Ignored for WFSS or if asn is provided\n        save_combined_background = boolean(default=False)  # Save combined background image\n        sigma = float(default=3.0)  # Clipping threshold\n        maxiters = integer(default=None)  # Number of clipping iterations\n        soss_source_percentile = float(default=35.0) # Threshold flux percentile to mask out source pixels\n        soss_bkg_percentile = float_list(min=2, max=2, default=None) # Background percentiles to use; default is [25.0, 50.0]\n        wfss_mmag_extract = float(default=None)  # WFSS minimum abmag to extract\n        wfss_maxiter = integer(default=5)  # WFSS iterative outlier rejection max iterations\n        wfss_rms_stop = float(default=0)  # WFSS iterative outlier rejection RMS improvement threshold (percent)\n        wfss_outlier_percent = float(default=1)  # WFSS outlier percentile to reject per iteration\n    '

Methods Documentation

process(step_input, input_bkg_list=None)[source]

Subtract designated background images from target exposures.

Parameters:
step_inputstr, ImageModel or IFUImageModel

Input target data model to which background subtraction is applied or asn file

input_bkg_listlist, optional

File name list of background exposures.

Returns:
resultImageModel or IFUImageModel

The background-subtracted target data model