calwebb_detector1: Stage 1 Detector Processing

Class:

jwst.pipeline.Detector1Pipeline

Alias:

calwebb_detector1

The Detector1Pipeline applies basic detector-level corrections to all exposure types (imaging, spectroscopic, coronagraphic, etc.). It is applied to one exposure at a time. It is sometimes referred to as “ramps-to-slopes” processing, because the input raw data are in the form of one or more ramps (integrations) containing accumulating counts from the non-destructive detector readouts and the output is a corrected countrate (slope) image.

There are two general configurations for this pipeline, depending on whether the data are to be treated as a Time Series Observation (TSO). The configuration is provided by CRDS and the reftype pars-detector1pipeline. In general, for Non-TSO exposures, all applicable steps are applied to the data. For TSO exposures, some steps are set to be skipped by default (see the list of steps in the table below).

The list of steps applied by the Detector1Pipeline pipeline is shown in the table below. Note that MIRI exposures use some instrument-specific steps and some of the steps are applied in a different order than for Near-IR (NIR) instrument exposures.

Several steps in this pipeline include special handling for NIRCam “Frame 0” data. The NIRCam instrument has the ability to downlink the image from the initial readout that follows the detector reset at the start of each integration in an exposure. These images are distinct from the first group of each integration when on-board frame averaging is done. In these cases, the first group contains data from multiple frames, while frame zero is always composed of just the first frame following the reset. It can be used to recover an estimated slope for pixels that go into saturation already in the first group (see more details on that process in the ramp_fitting step). In order for the frame zero image to be utilized during ramp fitting, it must have all of the same calibrations and corrections applied as the first group in the various Detector1Pipeline steps. This includes the saturation, superbias, refpix, and linearity steps. Other steps do not have a direct effect on either the first group or frame zero pixel values.

Near-IR

MIRI

Step

Non-TSO

TSO

Step

Non-TSO

TSO

group_scale

group_scale

dq_init

dq_init

emicorr

saturation

saturation

ipc [1]

ipc

superbias

firstframe

refpix

lastframe

reset

linearity

linearity

persistence [2]

rscd

dark_current

dark_current

refpix

charge_migration [3]

jump

jump

ramp_fitting

ramp_fitting

gain_scale

gain_scale

Arguments

The calwebb_detector1 pipeline has one optional argument:

--save_calibrated_ramp  boolean  default=False

If set to True, the pipeline will save intermediate data to a file as it exists at the end of the jump step. The data at this stage of the pipeline are still in the form of the original 4D ramps (ncols x nrows x ngroups x nints) and have had all of the detector-level correction steps applied to it, including the detection and flagging of Cosmic-Ray (CR) hits within each ramp (integration). If created, the name of the intermediate file will be constructed from the root name of the input file, with the new product type suffix “_ramp” appended, e.g. “jw80600012001_02101_00003_mirimage_ramp.fits”.

Inputs

4D raw data

Data model:

RampModel

File suffix:

_uncal

The input to Detector1Pipeline is a single raw exposure, e.g. “jw80600012001_02101_00003_mirimage_uncal.fits”, which contains the original raw data from all of the detector readouts in the exposure (ncols x nrows x ngroups x nintegrations).

Note that in the operational environment, the input will be in the form of a Level1bModel, which only contains the 4D array of detector pixel values, along with some optional extensions. When such a file is loaded into the pipeline, it is immediately converted into a RampModel, and has all additional data arrays for errors and Data Quality flags created and initialized to zero.

The input can also contain a 3D cube of NIRCam “Frame 0” data, where each image plane in the 3D cube is the initial frame for each integration in the exposure. Only present when the option to downlink the frame zero data was selected in the observing program.

Outputs

4D corrected ramp

Data model:

RampModel

File suffix:

_ramp

Result of applying all pipeline steps up through the jump step, to produce corrected and CR-flagged 4D ramp data, which will have the same data dimensions as the input raw 4D data (ncols x nrows x ngroups x nints). Only created when the pipeline argument --save_calibrated_ramp is set to True (default is False).

2D countrate product

Data model:

ImageModel or IFUImageModel

File suffix:

_rate

All types of inputs result in a 2D countrate product, based on averaging over all of the integrations within the exposure. The output file will be of type “_rate”, e.g. “jw80600012001_02101_00003_mirimage_rate.fits”. The 2D “_rate” product is passed along to subsequent pipeline modules for all non-TSO and non-Coronagraphic exposures. For MIRI MRS and NIRSpec IFU exposures, the output data model will be IFUImageModel, while all others will be ImageModel.

3D countrate product

Data model:

CubeModel

File suffix:

_rateints

A 3D countrate product is created that contains the individual results of each integration. The 2D countrate images for each integration are stacked along the 3rd axis of the data cubes (ncols x nrows x nints). This output file will be of type “_rateints”. The 3D “_rateints” product is passed along to subsequent pipeline modules for all TSO and Coronagraphic exposures.

PARS-DETECTOR1PIPELINE Parameter Reference File

REFTYPE:

PARS-DETECTOR1PIPELINE

Data model:

N/A

Reference Selection Keywords

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

Instrument

Keywords

FGS

TSOVISIT

MIRI

TSOVISIT

NIRCAM

TSOVISIT

NIRISS

TSOVISIT

NIRSPEC

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