RampFitStep
- class romancal.ramp_fitting.RampFitStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)[source]
Bases:
RomanStepThis step fits a straight line to the value of counts vs. time to determine the mean count rate for each pixel.
Create a
Stepinstance.- 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
kwsagainst specs/config.**kws (dict) – Additional parameters to set. These will be set as member variables on the new Step instance.
Attributes Summary
Methods Summary
likely(input_model, readnoise_model, gain_model)Perform Maximum Likelihood Algorithm
ols_cas22(input_model, readnoise_model, ...)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='likely') # Algorithm to use to fit. Note: `ols_cas22` is deprecated and will be removed in a future version suffix = string(default='rampfit') # Default suffix of results rejection_threshold = float(default=4.5,min=0) # CR sigma rejection threshold 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) maximum_cores = string(default='1') # cores for multiprocessing. Can be an integer, 'half', 'quarter', or 'all' expand_large_events = boolean(default=False) # Turns on Snowball detection min_sat_area = float(default=1.0) # minimum required area for the central saturation of snowballs min_jump_area = float(default=6.0) # minimum area to trigger large events processing expand_factor = float(default=1.9) # The expansion factor for the enclosing circles or ellipses sat_required_snowball = boolean(default=True) # Require the center of snowballs to be saturated min_sat_radius_extend = float(default=0.5) # The min radius of the sat core to trigger the extension of the core sat_expand = integer(default=2) # Number of pixels to add to the radius of the saturated core of snowballs edge_size = integer(default=0) # Distance from detector edge where a saturated core is not required for snowball detection
- weighting = 'optimal'
Methods Documentation
- likely(input_model, readnoise_model, gain_model)[source]
Perform Maximum Likelihood Algorithm
- 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
- ols_cas22(input_model, readnoise_model, gain_model, include_var_rnoise=False)[source]
Deprecated since version 0.22.0: The ols_cas22 function is deprecated and may be removed in a future version.
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