Overview

This module provides the sole interface to all methods of performing outlier detection on JWST observations.

Processing multiple datasets together allows for the identification of bad pixels or cosmic rays that remain in each of the input images, often at levels which were not detectable by the jump step. The outlier_detection step supports multiple algorithms and determines the appropriate algorithm for the type of observation being processed. This step supports:

  • Image modes: ‘FGS_IMAGE’, ‘MIR_IMAGE’, ‘NRC_IMAGE’, ‘NIS_IMAGE’
  • Slit-like Spectroscopic modes: ‘MIR_LRS-FIXEDSLIT’, ‘NRS_FIXEDSLIT’, ‘NRS_MSASPEC’
  • Time-Series-Observation (TSO) modes: ‘MIR_LRS-SLITLESS’, ‘NRC_TSGRISM’, ‘NIS_SOSS’, ‘NRS_BRIGHTOBJ’, ‘NRC_TSIMAGE’, as well as TSOs obtained with the MIRI imager (‘MIR_IMAGE’ with TSOVISIT=True).
  • IFU Spectroscopic modes: ‘MIR_MRS’, ‘NRS_IFU’
  • Coronagraphic Image modes: ‘MIR_LYOT’, ‘MIR_4QPM’, ‘NRC_CORON’

This step uses the following logic to apply the appropriate algorithm to the input data:

  1. Interpret inputs (Association, ModelContainer, ModelLibrary, or CubeModel) to identify all input observations to be processed

  2. Read in parameters set by user. See Step Arguments for the full list of parameters.

  3. Select outlier detection algorithm based on exposure type in input model meta.exposure.type.

  4. Instantiate and run outlier detection class determined for the exposure type using parameter values interpreted from inputs.

  5. Update DQ arrays with flags and set SCI, ERR, and variance arrays to NaN at the location of identified outliers.