exotic_miri.stage_1

class exotic_miri.stage_1.DropGroupsStep(*args: Any, **kwargs: Any)[source]

Bases: Step

Drop groups step.

process(input)[source]

Drop groups which may be adversely affecting the ramps. This may be due to detector effects such RSCD and/or the last frame effect. This step simply marks groups as do_not_use and are thus ignored in subsequent processing, such as by jwst.calwebb_detector1.ramp_fit_step.

Parameters:
  • input (jwst.datamodels.RampModel) – This is an uncal.fits loaded data segment.

  • drop_groups (list of integers) – These integers are the groups to be dropped. The integers are zero-indexed such that 0 is the first group.

Returns:

output – A RampModel with groupdq flags set as do_not_use (2**0).

Return type:

jwst.datamodels.RampModel

class exotic_miri.stage_1.ReferencePixelStep(*args: Any, **kwargs: Any)[source]

Bases: Step

Reference pixel step.

process(input)[source]

Reference pixel correction at the group level, using the reference pixels available to the MIRI LRS subarray. The corrections can be made with a variety of options for smoothing the values and/or separating odd and even rows.

The default pipeline, at the time of programming, does not have this option for subarrays. It assumes subarrays have no available reference pixels, but the MIRI LRS subarray is against the edge of the detector.

Parameters:
  • input (jwst.datamodels.RampModel) – This is an uncal.fits loaded data segment.

  • smoothing_length (integer) – If not None, the number of rows to median smooth the estimated reference pixel values over. Default is no smoothing.

  • odd_even_rows (boolean) – Treat the correction separately for odd and even rows. Default is True.

  • draw_correction (boolean) – Plot the correction images.

Returns:

output – A RampModel with the reference pixel correction applied.

Return type:

jwst.datamodels.RampModel

class exotic_miri.stage_1.GroupBackgroundSubtractStep(*args: Any, **kwargs: Any)[source]

Bases: Step

Group-level background subtraction step.

process(input)[source]

Subtract the background at the group level.

Parameters:
  • input (jwst.datamodels.RampModel) – This is an uncal.fits loaded data segment.

  • method (string) – The background subtraction method: constant, the background is estimated as a median over the entire background region; row_wise, the background is estimated as a median per row; col_wise; the background is estimated within a row as a linear function of column number. Default is row_wise.

  • bkg_col_left_start (integer) – The column index of the start of the background region on the left side of the spectral trace. Default is 8.

  • bkg_col_left_end (integer) – The column index of the end of the background region on the left side of the spectral trace. Default is 17.

  • bkg_col_right_start (integer) – The column index of the start of the background region on the right side of the spectral trace. Default is 56.

  • bkg_col_right_end (integer) – The column index of the end of the background region on the right side of the spectral trace. Default is 72.

  • smoothing_length (integer) – If not None, the number of rows to median smooth the estimated background values over. Default is no smoothing.

Returns:

output – A RampModel with the background subtracted from each group.

Return type:

jwst.datamodels.RampModel

class exotic_miri.stage_1.DropIntegrationsStep(*args: Any, **kwargs: Any)[source]

Bases: Step

Drop integrations step.

process(input)[source]

Drop integrations from a data segment. The use of this step is most likely because these integrations are too severely affected by systematics to be worth processing, or this step may also be useful if the user wants to test pipelines on only a small subset of data.

Parameters:
  • input (jwst.datamodels.RampModel) – This is an uncal.fits loaded data segment.

  • drop_integrations (list of integers) – These integers are the integrations to be dropped. The integers are zero-indexed such that 0 is the first integration.

Returns:

output – A RampModel with [drop_integrations] removed.

Return type:

jwst.datamodels.RampModel

class exotic_miri.stage_1.RegroupStep(*args: Any, **kwargs: Any)[source]

Bases: Step

Regroup long integrations into more shorter integrations.

process(input)[source]

Regroup integrations, comprised of m groups, into several smaller integrations, comprised of n groups, where m is a multiple of n. This may not be helpful but it is here if you want to try it. TODO: add support for non-multiples.

Parameters:
  • input (jwst.datamodels.RampModel) – This is an uncal.fits loaded data segment.

  • n_groups (integer) – The new number of groups per integration.

Returns:

output – A RampModel reshaped into n_groups.

Return type:

jwst.datamodels.RampModel