NSCleanStep
- class jwst.nsclean.NSCleanStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)[source]
Bases:
JwstStep
Perform 1/f noise correction.
NOTE: This step is a deprecated alias to the
clean_flicker_noise
step.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)Fit and subtract 1/f background noise from a NIRSpec image.
Attributes Documentation
- class_alias = 'nsclean'
- spec
fit_method = option('fft', 'median', default='fft') # Noise fitting algorithm fit_by_channel = boolean(default=False) # Fit noise separately by amplifier background_method = option('median', 'model', None, default=None) # Background fit background_box_size = int_list(min=2, max=2, default=None) # Background box size mask_spectral_regions = boolean(default=True) # Mask WCS-defined spectral regions n_sigma = float(default=5.0) # Clipping level for outliers fit_histogram = boolean(default=False) # Fit a value histogram to derive sigma single_mask = boolean(default=False) # Make a single mask for all integrations user_mask = string(default=None) # Path to user-supplied mask save_mask = boolean(default=False) # Save the created mask save_background = boolean(default=False) # Save the fit background save_noise = boolean(default=False) # Save the fit noise skip = boolean(default=True) # By default, skip the step
Methods Documentation
- process(input_data)[source]
Fit and subtract 1/f background noise from a NIRSpec image.
- Parameters:
- input_data
ImageModel
,IFUImageModel
Input datamodel to be corrected.
- input_data
- Returns:
- output_model
ImageModel
,IFUImageModel
The 1/f corrected datamodel.
- output_model