CleanFlickerNoiseStep
- class jwst.clean_flicker_noise.CleanFlickerNoiseStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)[source]
Bases:
JwstStep
Perform flicker noise correction.
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 ramp data set.
Attributes Documentation
- class_alias = 'clean_flicker_noise'
- reference_file_types: ClassVar = ['flat']
- spec
fit_method = option('fft', 'median', default='median') # Noise fitting algorithm fit_by_channel = boolean(default=False) # Fit noise separately by amplifier (NIR only) background_method = option('median', 'model', None, default='median') # Background fit background_box_size = int_list(min=2, max=2, default=None) # Background box size mask_science_regions = boolean(default=False) # Mask known science regions apply_flat_field = boolean(default=False) # Apply a flat correction before fitting n_sigma = float(default=2.0) # Clipping level for non-background signal fit_histogram = boolean(default=False) # Fit a value histogram to derive sigma single_mask = boolean(default=True) # 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 ramp data set.
Input data is expected to be a ramp file (RampModel), in between jump and ramp fitting steps, or a rate file (ImageModel or CubeModel).
Correction algorithms implemented are:
- “fft”: Background noise is fit in frequency space.
Implementation is based on the NSClean algorithm, developed by Bernard Rauscher.
“median”: Background noise is characterized by a median along the detector slow axis. Implementation is based on the “image1overf” algorithm, developed by Chris Willott.
- Parameters:
- input_dataDataModel
Input datamodel to be corrected
- Returns:
- output_modelDataModel
The flicker noise corrected datamodel