Description

Classes:

jwst.outlier_detection.OutlierDetectionStep, jwst.outlier_detection.OutlierDetectionScaledStep, jwst.outlier_detection.OutlierDetectionStackStep

Aliases:

outlier_detection, outlier_detection_scaled, outlier_detection_stack

Processing multiple datasets together allows for the identification of bad pixels or cosmic-rays that remain in each of the input images, many times at levels which were not detectable by the jump step. The outlier_detection step implements the following algorithm to identify and flag any remaining cosmic-rays or other artifacts left over from previous calibrations:

  1. build a stack of input data

    • all inputs will need to have the same WCS since outlier detection assumes the same flux for each point on the sky, and variations from one image to the next would indicate a problem with the detector during readout of that pixel

    • if needed, each input will be resampled to a common output WCS

  2. create a median image from the stack of input data

    • this median operation will ignore any input pixels which have a weight which is too low (<70% max weight)

  3. create “blotted” data from the median image to exactly match each original input dataset

  4. perform a statistical comparison (pixel-by-pixel) between the median blotted data with the original input data to look for pixels with values that are different from the mean value by more than some specified sigma based on the noise model

    • the noise model used relies on the error array computed by previous calibration steps based on the readnoise and calibration errors

  5. flag the DQ array for the input data for any pixel (or affected neighboring pixels) identified as a statistical outlier

The outlier detection step serves as a single interface to apply this general process to any JWST data, with specific variations of this algorithm for each type of data. Sub-classes of the outlier detection algorithm have been developed specifically for:

  1. Imaging data

  2. IFU spectroscopic data

  3. TSO data

  4. coronagraphic data

  5. spectroscopic data

This allows the outlier_detection step to be tuned to the variations in each type of JWST data.

Reference Files

The outlier_detection step uses the PARS-OUTLIERDETECTIONSTEP parameter reference file.

PARS-OUTLIERDETECTIONSTEP Parameter Reference File

REFTYPE:

PARS-OUTLIERDETECTIONSTEP

Data model:

N/A

Reference Selection Keywords

CRDS selects appropriate pars-outlierdetectionstep references based on the following keywords.

Instrument

Keywords

FGS

EXP_TYPE

MIRI

EXP_TYPE, FILTER, SUBARRAY, TSOVISIT

NIRCAM

EXP_TYPE, FILTER, PUPIL, TSOVISIT

NIRISS

EXP_TYPE, FILTER, PUPIL, TSOVISIT

Standard Keywords

The following table lists the keywords that are required to be present in all reference files. The first column gives the FITS keyword names. The second column gives the jwst data model name for each keyword, which is useful when using data models in creating and populating a new reference file. The third column gives the equivalent meta tag in ASDF reference file headers, which is the same as the name within the data model meta tree (second column).

FITS Keyword

Data Model Name

ASDF meta tag

AUTHOR

model.meta.author

author

DATAMODL

model.meta.model_type

model_type

DATE

model.meta.date

date

DESCRIP

model.meta.description

description

FILENAME

model.meta.filename

N/A

INSTRUME

model.meta.instrument.name

instrument: {name}

PEDIGREE

model.meta.pedigree

pedigree

REFTYPE

model.meta.reftype

reftype

TELESCOP

model.meta.telescope

telescope

USEAFTER

model.meta.useafter

useafter

NOTE: More information on standard required keywords can be found here: Standard Required Keywords