PixelReplaceStep
- class jwst.pixel_replace.PixelReplaceStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)[source]
Bases:
JwstStep
Module for replacing flagged bad pixels prior to spectral extraction.
- algorithm
Method used to estimate flux values for bad pixels. Currently only one option is implemented, using a profile fit to adjacent column values.
- Type:
- n_adjacent_cols
Number of adjacent columns (on either side of column containing a bad pixel) to use in creation of source profile, in cross-dispersion direction. The total number of columns used in the profile will be twice this number; on array edges, take adjacent columns until this number is reached.
- Type:
Create a
Step
instance.- Parameters:
name (str, optional) – 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 instance, optional) – 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_file (str or pathlib.Path, optional) – The path to the config file that this step was initialized with. Use to determine relative path names of other config files.
**kws (dict) – Additional parameters to set. These will be set as member variables on the new Step instance.
Attributes Summary
Methods Summary
process
(input_data)Execute the step.
Attributes Documentation
- class_alias = 'pixel_replace'
- spec
algorithm = option("fit_profile", "mingrad", "N/A", default="fit_profile") # Number of adjacent columns to use in profile creation n_adjacent_cols = integer(default=3) skip = boolean(default=True) # Step must be turned on by parameter reference or user output_use_model = boolean(default=True) # Use input filenames in the output models
Methods Documentation
- process(input_data)[source]
Execute the step.
- Parameters:
input_data (datamodel, str) – The input datamodel or filename containing spectral data in need of pixel replacement.
- Returns:
This will be
input
if the step was skipped; otherwise, it will be a model containing data arrays with estimated fluxes for any bad pixels, now flagged as TO-BE-DETERMINED (DQ bit 7?).- Return type:
JWST DataModel