OutlierDetection for Long-Slit Spectroscopic Data¶
This module serves as the interface for applying outlier_detection to long-slit spectroscopic observations. The code implements the basic outlier detection algorithm used with HST data, as adapted to JWST spectroscopic observations.
Specifically, this routine performs the following operations (modified from the Default Outlier Detection Algorithm ):
- Extract parameter settings from input model and merge them with any user-provided values
- the same set of parameters available to Default Outlier Detection Algorithm also applies to this code
- Convert input data, as needed, to make sure it is in a format that can be processed
- A
ModelContainer
serves as the basic format for all processing performed by this step, as each entry will be treated as an element of a stack of images to be processed to identify bad-pixels/cosmic-rays and other artifacts. - If the input data is a
CubeModel
, convert it into aModelContainer
. This allows each plane of the cube to be treated as a separate 2D image for resampling (if done at all) and for combining into a median image.
- A
- Resamples all input images into a
ModelContainer
usingResampleSpecData
- Resampled images will be written out to disk if
save_intermediate_results
parameter has been set toTrue
- If resampling was turned off, the original inputs will be used to create the median image for cosmic-ray detection.
- Resampled images will be written out to disk if
- Creates a median image from (possibly) resampled
ModelContainer
- Median image will be written out to disk if
save_intermediate_results
parameter has been set toTrue
- Median image will be written out to disk if
- Blot median image to match each original input exposure.
- Resampled/blotted images will be written out to disk if
save_intermediate_results
parameter has been set toTrue
- If resampling was turned off, the median image will be used as for comparison with the original input models for detecting cosmic-rays.
- Resampled/blotted images will be written out to disk if
- Perform statistical comparison between blotted image and original image to identify outliers.
- Updates input data model DQ arrays with mask of detected outliers.
jwst.outlier_detection.outlier_detection_spec Module¶
Class definition for performing outlier detection on spectra.
Classes¶
OutlierDetectionSpec (input_models[, reffiles]) |
Class definition for performing outlier detection on spectra. |