MasterBackgroundStep
- class jwst.master_background.MasterBackgroundStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)[source]
Bases:
JwstStep
Compute and subtract master background from spectra.
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.
- parent
Step
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
Methods Summary
process
(input_data)Compute and subtract a master background spectrum.
save_container
(container[, suffix, asn_id, ...])Save all models in container for intermediate background subtraction.
Attributes Documentation
- class_alias = 'master_background'
- spec
median_kernel = integer(default=1) # Moving-median boxcar size to filter the background user_background = string(default=None) # Path to user-supplied master background save_background = boolean(default=False) # Save computed master background force_subtract = boolean(default=False) # Force subtracting master background output_use_model = boolean(default=True)
Methods Documentation
- process(input_data)[source]
Compute and subtract a master background spectrum.
- Parameters:
- input_data
ImageModel
,IFUImageModel
,ModelContainer
, str Input target datamodel(s) or association file to which master background subtraction is to be applied.
- input_data
- Returns:
- result
ImageModel
,IFUImageModel
,ModelContainer
The background-subtracted science datamodel(s)
- result