WfssContamStep

class jwst.wfss_contam.wfss_contam_step.WfssContamStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)[source]

Bases: JwstStep

Perform contamination correction of WFSS 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.

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

class_alias

reference_file_types

spec

Methods Summary

process(input_data)

Run the WFSS contamination correction step.

Attributes Documentation

class_alias = 'wfss_contam'
reference_file_types: ClassVar = ['photom', 'wavelengthrange']
spec
save_simulated_image = boolean(default=True)  # Save full-frame simulated image
save_contam_images = boolean(default=None)  # Deprecated; has no effect
maximum_cores = string(default='1')
skip = boolean(default=True)
orders = list(default=None)  # Spectral orders to process, e.g. 1, or 1,2,3
magnitude_limit = float(default=None) # Isophotal AB magnitude limit for sources to be included in the contamination correction
wl_oversample = integer(default=2) # oversampling factor for wavelength grid
max_pixels_per_chunk = integer(default=5000) # max number of pixels to disperse at once
polyfit_degree = integer(default=None)  # Degree of polynomial fit to spectral shape
n_iterations = integer(default=1)  # Number of contamination-correction iterations
l2_alpha = float(default=0.1)  # L2 regularization strength for polynomial spectral fit
rejection_threshold = float(default=0.1)  # Threshold for rejecting polynomial fits based on fitted constant term coefficient
pdt_spacing = integer(default=None)  # Spacing of grid points per spatial axis for the trace lookup table; None disables spatial interpolation and uses the full transform at every pixel
pdt_wl_oversample = float(default=None)  # Oversampling factor for the trace lookup table's wavelength grid; None matches the grid specified by wl_oversample

Methods Documentation

process(input_data)[source]

Run the WFSS contamination correction step.

Parameters:
input_datastr or MultiSlitModel

The input file name or data model containing 2-D cutouts for each identified source.

Returns:
output_modelMultiSlitModel

A datamodel containing contamination-corrected source cutouts, simulated cutouts, and contamination estimates.