ResetRampFitStep#
snowblind.ResetRampFitStep, run with strun reset_rampfit. The reset-anchored fit: the jwst likelihood ramp fit with the reset level as
an extra point at the start of the ramp, so pixels with a single unsaturated
group still get a rate. Replaces the jwst ramp_fit step.
Guide: 1/f cleaning along the readout stream and reset-anchored ramp fitting.
- Parameters:
- reset_calibstring, default
None ASDF from snowblind-reset-calib; without it and without sigma_b, the calibration packaged for the detector is used
- sigma_bfloat, default
None DN; scalar reset scatter, overrides the calibration file
- t1_scalefloat, default
None fraction of the nominal first interval the first read integrates, for this exposure; overrides the file and its rescaling
- per_channel_timingboolean, default
True use the file’s per-channel t1_scale and reset_offset when present
- use_pedestal_meanboolean, default
False prior mean of the reset level from the calibration file’s pedestal_mean map
- prior_highpassboolean, default
True remove the pedestal map’s row, even-odd and column structure, as stream_clean removes it from the first read
- reset_offsetfloat, default
0.0 DN added to the prior mean of the reset level, on top of the file’s or the anchored value
- anchor_offset_to_skyboolean, default
True measure the reset offset per channel in each integration from its own faint pixels instead of using the file’s
- anchor_max_signalfloat, default
50.0 DN; pixels whose first-resultant signal is below this count as sky for the anchor
- anchor_min_pixelsinteger, default
1000 a channel with fewer sky pixels than this in an integration takes the median of that integration’s other channels, or the file’s offset when none has enough
- anchor_timing_to_starsboolean, default
False also fit the first-read scale per channel from this exposure’s bright unsaturated pixels (needs many bright pixels)
- anchor_min_brightinteger, default
500 fewer bright pixels than this in a channel keeps the file’s first-read scale there
- use_zeroframeboolean, default
True use the zeroframe when present
- rejection_thresholdfloat, default
None sigma threshold of the likelihood jump search, which runs on top of the jump step’s flags; None for stcal’s 4.5
- save_optboolean, default
False save used_reset and d0_resid as a _resetfit ASDF product
- algorithmstring, default
'LIKELY' the fit is always the reset-anchored likelihood fit
int_name : string, default
''opt_name : string, default
''- suppress_one_groupboolean, default
False one-group pixels are what the reset point is for; never suppressed
- firstgroupinteger, default
None not implemented; a value given is reported and ignored
- lastgroupinteger, default
None not implemented; a value given is reported and ignored
- maximum_coresstring, default
'1' the fit runs in one process
- as_hookboolean, default
False return the rate image alone, as a post-hook of a skipped ramp_fit must, and write the rateints product
- override_readnoiseis_string_or_datamodel, default
None Override the readnoise reference file
- override_gainis_string_or_datamodel, default
None Override the gain reference file
- override_superbiasis_string_or_datamodel, default
None Override the superbias reference file
- reset_calibstring, default
The parameters every stpipe step has (skip, save_results,
output_dir, suffix, pre_hooks, post_hooks and the
others) are described in the stpipe documentation.
- class snowblind.ResetRampFitStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)#
Fit ramps by maximum likelihood with a Gaussian prior on the reset level.
Input is a ~stdatamodels.jwst.datamodels.RampModel after the jump step (and after StreamCleanStep with
clean_first_groupwhen both are used). Output is an ~stdatamodels.jwst.datamodels.ImageModel and a ~stdatamodels.jwst.datamodels.CubeModel as from the jwst ramp_fit step.meta.cal_step.ramp_fitis set to COMPLETE as well so that downstream steps treat the result as a rate product.The prior on the reset level comes from a calibration ASDF file written by
snowblind-reset-calib(reset_calib), or from a scalarsigma_b. Main options:use_pedestal_meantakes the mean reset level map from the file;t1_scaleandper_channel_timingset the first-read timing;anchor_offset_to_skymeasures the reset offset per output channel in each integration andanchor_timing_to_starsthe first-read scale per output channel, from the exposure itself;save_optwrites theused_resetandd0_residdiagnostics. Fewer thanMIN_NGROUPSgroups gives no rate products, as in the jwst step.- process(step_input)#
Fit the ramps of a group-level product.
- Parameters:
- step_inputstr or ~stdatamodels.jwst.datamodels.RampModel
A
_jumpramp or its path; data shape (nints, ngroups, nrows, ncols) in DN.
- Returns:
- out_model~stdatamodels.jwst.datamodels.ImageModel or None
The rate product in DN/s, averaged over integrations. With
save_resultsthe two products are written with the_rateand_rateintssuffixes. Withas_hookonly this model is returned and the_rateintsproduct is written.- int_model~stdatamodels.jwst.datamodels.CubeModel or None
The per-integration rate product in DN/s. Both are None when the ramp has fewer than
MIN_NGROUPSgroups.