snowblind_detector1#

snowblind.Detector1Pipeline, run with strun snowblind_detector1. calwebb_detector1 with StreamCleanStep, SnowblindStep and ResetRampFitStep in place, the SIRS reference-pixel correction turned on and the pixels next to saturated ones flagged CHARGELOSS instead of SATURATED. A drop-in replacement. Guide: 1/f cleaning along the readout stream and reset-anchored ramp fitting.

Parameters:

save_calibrated_ramp : boolean, default False

stream_cleanboolean, default True

hook StreamCleanStep after the jump step and skip the jwst flicker step

reset_fitboolean, default True

fit ramps with ResetRampFitStep instead of the jwst ramp fit

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.

Step slots that snowblind fills:

  • superbias: snowblind.superbias.SuperBiasStep

  • ramp_fit: snowblind.reset_rampfit.ResetRampFitStep

class snowblind.Detector1Pipeline(*args, **kwargs)#

calwebb_detector1 with the stream clean after the jump step and the reset-anchored ramp fit.

The step slots and their parameters are the jwst pipeline’s (--steps.jump..., --steps.refpix.refpix_algorithm=sirs and so on), and so are the parameters CRDS provides for calwebb_detector1. The differences: jump gets StreamCleanStep as a post-hook (--steps.stream_clean is not a slot; its parameters go through the hook, e.g. --steps.jump.post_hooks="snowblind.StreamCleanStep(background_method='integration_model')",), clean_flicker_noise is skipped, and ramp_fit is ResetRampFitStep, whose parameters are set as --steps.ramp_fit.reset_calib=.... Either substitution is switched off with --stream_clean=False or --reset_fit=False, which gives the jwst step back.

The reference-pixel step runs with SIRS (REFPIX_DEFAULTS) and the jump step with JUMP_DEFAULTS (7 sigma, no large-event expansion), over the CRDS parameters; with expand_large_events off SnowblindStep is its first post-hook, its ring_width set so that the ring reaches RING_REACH (3) pixels from the saturated pixels. The caller’s --steps.refpix... and --steps.jump... parameters still win, and --steps.jump.expand_large_events=True gives the jwst snowball flagging back instead of the hook.

The saturation step runs with n_pix_grow_sat=0 (SATURATION_DEFAULTS), so that SATURATED marks only the pixels that reach the saturation threshold, which persist after the reset, and snowblind.saturation.flag_saturation_neighbors as its first post-hook sets CHARGELOSS and DO_NOT_USE on the pixels next to them, which the jwst step’s default would have set SATURATED on. With the caller’s --steps.saturation.n_pix_grow_sat above 0 the hook is left out and ring_width is smaller by as much (2 for the jwst default of 1).

The superbias slot holds snowblind.superbias.SuperBiasStep, the jwst step, which also keeps the zeroframe pixels its subtraction makes exactly zero from reading as unusable to the later steps.

process(input_data)#

Run the Detector1 pipeline on the input data.

Parameters:
input_datastr or ~stdatamodels.jwst.datamodels.RampModel

The input data to process.

Returns:
~stdatamodels.jwst.datamodels.JwstDataModel

The calibrated data model.