Reference Files
The dq_init
step uses a MASK reference file.
MASK Reference File
- REFTYPE:
MASK
- Data model:
The MASK reference file contains pixel-by-pixel DQ flag values that indicate problem conditions.
Reference Selection Keywords for MASK
CRDS selects appropriate MASK references based on the following keywords. MASK is not applicable for instruments not in the table.
Instrument |
Keywords |
---|---|
FGS |
INSTRUME, DETECTOR, SUBARRAY, EXP_TYPE, DATE-OBS, TIME-OBS |
MIRI |
INSTRUME, DETECTOR, SUBARRAY, DATE-OBS, TIME-OBS |
NIRCam |
INSTRUME, DETECTOR, SUBARRAY, DATE-OBS, TIME-OBS |
NIRISS |
INSTRUME, DETECTOR, SUBARRAY, DATE-OBS, TIME-OBS |
NIRSpec |
INSTRUME, DETECTOR, SUBARRAY, READPATT, DATE-OBS, TIME-OBS |
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
Type Specific Keywords for MASK
In addition to the standard reference file keywords listed above, the following keywords are required in MASK reference files, because they are used as CRDS selectors (see Reference Selection Keywords for MASK):
Keyword |
Data Model Name |
Instruments |
---|---|---|
DETECTOR |
model.meta.instrument.detector |
All |
SUBARRAY |
model.meta.subarray.name |
All |
EXP_TYPE |
model.meta.exposure.type |
FGS only |
READPATT |
model.meta.exposure.readpatt |
NIRSpec only |
Reference File Format
MASK reference files are FITS format, with one IMAGE extension and 1 BINTABLE extension. The FITS primary HDU does not contain a data array. The format and content of the file is as follows:
EXTNAME |
XTENSION |
NAXIS |
Dimensions |
Data type |
---|---|---|---|---|
DQ |
IMAGE |
2 |
ncols x nrows |
integer |
DQ_DEF |
BINTABLE |
2 |
TFIELDS = 4 |
N/A |
The values in the DQ
array give the per-pixel flag conditions that are
to be propagated into the science exposure’s PIXELDQ
array.
The dimensions of the DQ
array should be equal to the number of columns
and rows in a full-frame readout of a given detector, including reference
pixels.
Note that this does not include the reference output for MIRI detectors.
The DQ_DEF extension contains the bit assignments used in the DQ array. It contains the following 4 columns:
TTYPE |
TFORM |
Description |
---|---|---|
BIT |
integer |
The bit number, starting at zero |
VALUE |
integer |
The equivalent base-10 value of BIT |
NAME |
string |
The mnemonic name of the data quality condition |
DESCRIPTION |
string |
A description of the data quality condition |
NOTE: For more information on standard bit definitions see: Data Quality Flags.