RampFitStep

class romancal.ramp_fitting.RampFitStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)[source]

Bases: RomanStep

This step fits a straight line to the value of counts vs. time to determine the mean count rate for each pixel.

Create a Step instance.

Parameters:
  • name (str) – 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_file (str 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_kwds (bool) – Validate given kws against specs/config.

  • **kws (dict) – Additional parameters to set. These will be set as member variables on the new Step instance.

Attributes Summary

class_alias

reference_file_types

spec

weighting

Methods Summary

ols_cas22(input_model, readnoise_model, ...)

Peform Optimal Linear Fitting on arbitrarily space resulants

process(dataset)

This is where real work happens.

Attributes Documentation

class_alias = 'ramp_fit'
reference_file_types: ClassVar = ['readnoise', 'gain']
spec
algorithm = option('ols_cas22', 'likely', default='ols_cas22')  # Algorithm to use to fit.
suffix = string(default='rampfit')  # Default suffix of results
use_ramp_jump_detection = boolean(default=True) # Use jump detection during ramp fitting
threshold_intercept = float(default=None) # Override the intercept parameter for the threshold function in the jump detection algorithm.
threshold_constant = float(default=None) # Override the constant parameter for the threshold function in the jump detection algorithm.
include_var_rnoise = boolean(default=False) # include var_rnoise in output (can be reconstructed from err and other variances)
weighting = 'optimal'

Methods Documentation

ols_cas22(input_model, readnoise_model, gain_model, include_var_rnoise=False)[source]

Peform Optimal Linear Fitting on arbitrarily space resulants

Parameters:
  • input_model (RampModel) – Model containing ramps.

  • readnoise_model (ReadnoiseRefModel) – Model with the read noise reference information.

  • gain_model (GainRefModel) – Model with the gain reference information.

Returns:

out_model – Model containing a count-rate image.

Return type:

ImageModel

process(dataset)[source]

This is where real work happens. Every Step subclass has to override this method. The default behaviour is to raise a NotImplementedError exception.