exotic_miri.reference
- class exotic_miri.reference.GetIntegrationTimes(*args: Any, **kwargs: Any)[source]
Bases:
Step
Get the integration times.
- process(input)[source]
Get and save the integration times for a data segment, and compute the integration duration in seconds.
- Parameters:
input (jwst.datamodels.RampModel) – This is an uncal.fits loaded data segment.
- Returns:
timing_data and integration_duration – Table of integration times data and duration of an integration in seconds.
- Return type:
tuple(fits.table, float)
- class exotic_miri.reference.SetCustomGain(*args: Any, **kwargs: Any)[source]
Bases:
Step
Set a custom gain.
- process(input)[source]
Set a custom gain value. This step creates a gain model which can be passed to other steps for processing. It should be passed to all steps that make use of the gain, and passed via the arg ‘override_gain’. This includes stage 1 steps such as jwst.calwebb_detector1.jump_step, jwst.calwebb_detector1.ramp_fit_step, and jwst.calwebb_detector1.gain_scale_step.
- Parameters:
input (jwst.datamodels.RampModel) – This is an uncal.fits loaded data segment.
gain_value (float) – The gain value to set. Default is 3.1.
- Returns:
gain – The gain model which can be passed to other steps.
- Return type:
jwst.datamodels.GainModel
- class exotic_miri.reference.SetCustomLinearity(*args: Any, **kwargs: Any)[source]
Bases:
Step
Set a custom linearity correction.
- process(input)[source]
Make self-calibrated linearity corrections per amplifier. This step uses the uncal.fits data to create a new linearity model. This model can then be passed to the jwst.calwebb_detector1.linearity_step via the arg ‘override_linearity’.
The correction involves extrapolating a linear fit to an assumed linear /“well-behaved” section of the ramps, and then fitting a polynomial to the residuals. The polynomial has the constant- and linear-term coefficients fixed at 0 and 1 respectively. Recommended usage requires a large number of groups, >~40, although this is still experimental.
- Parameters:
input (jwst.datamodels.RampModel) – This is an uncal.fits loaded data segment.
group_idx_start_fit (integer) – The first group index included in the linear fit. This corresponds to the start of the section of the ramp which is assumed to be well behaved. Default is 10.
group_idx_end_fit (integer) – The last group index included in the linear fit. This corresponds to the end of the section of the ramp which is assumed to be well behaved. Default is 40.
group_idx_start_derive (integer) – The first group index included in the derived linearity correction. Default is 10.
group_idx_end_derive (integer) – The last group index included in the derived linearity correction. Default is -1.
row_idx_start_used (integer) – The first row index included in the derived linearity correction. Default is 350.
row_idx_end_used (integer) – The last row index included in the derived linearity correction. Default is 386.
draw_corrections (boolean) – Plot the derived linearity correction.
- Returns:
linearity – The linearity model which can be passed to other steps.
- Return type:
jwst.datamodels.LinearityModel
- class exotic_miri.reference.GetWavelengthMap(*args: Any, **kwargs: Any)[source]
Bases:
Step
Get the wavelength map.
- process(input)[source]
Get and save the wavelength map data. This is the mapping from the detector pixels (row_idx, col_idx) to wavelength (lambda). To run this step the input must first have had the jwst.calwebb_spec2.assign_wcs_step and jwst.calwebb_spec2.srctype_step already run.
- Parameters:
input (jwst.datamodels.CubeModel) – This is an rateints.fits loaded data segment.
- Returns:
wavelength_map – The wavelength map with shape (n_rows, n_cols).
- Return type:
np.ndarray
- class exotic_miri.reference.GetDefaultGain(*args: Any, **kwargs: Any)[source]
Bases:
Step
Get the default gain.
- process(input)[source]
Get and save gain data from the default CRDS files.
- Parameters:
input (jwst.datamodels.RampModel or jwst.datamodels.CubeModel) – This is either an uncal.fits or rateints.fits loaded data segment. The gain will be the same no matter which data segment you pass in.
median_value (boolean) – If True only return the median value rather than the gain model. Default is False.
save (boolean) – If True save the gain model to disc. Default is False.
save_path (string) – If save==True save the gain model to this path. Default is None.
- Returns:
if median_value == False –
- gainjwst.datamodels.GainModel
The gain model which can be passed to other steps.
elif median_value == True –
- gainfloat
The median gain value on the entire detector.
- class exotic_miri.reference.GetDefaultReadNoise(*args: Any, **kwargs: Any)[source]
Bases:
Step
Get the default readnoise.
- process(input)[source]
Get and save readnoise data from the default CRDS files.
- Parameters:
input (jwst.datamodels.RampModel or jwst.datamodels.CubeModel) – This is either an uncal.fits or rateints.fits loaded data segment. The readnoise will be the same no matter which data segment you pass in.
median_value (boolean) – If True only return the median value rather than the readnoise model. Default is False.
save (boolean) – If True save the readnoise model to disc. Default is False.
save_path (string) – If save==True save the readnoise model to this path. Default is None.
- Returns:
if median_value == False –
- gainjwst.datamodels.ReadnoiseModel
The readnoise model which can be passed to other steps.
elif median_value == True –
- gainfloat
The median readnoise value on the entire detector.