Data Quality Initialization¶
The Data Quality (DQ) flags track problems in the data. In the initialization step, the PIXELDQ and/or GROUPDQ extension are created. The PIXELDQ extension is filled with information from the static Data Quality mask (Bad Pixel mask reference file) for the input dataset using a bitwise_or function. The GROUPDQ array is initialized to zero. The PIXELDQ extension is a 2-D array that contains the pixel dependent flags that are the same for all groups and integrations within an exposure, while the GROUPDQ extension is a 4-D array that stores flags that can vary from one group or integration to the next and that will be populated by subsequent steps. For more details refer to JWST-STScI-004355 and the calibration pipeline online software documentation in http://ssb.stsci.edu/doc/jwst_git/docs/dq_init/html/.
Test Requirements¶
| Requirement | Fulfilled by |
|---|---|
| The PIXELDQ is initialized with the information from the reference file. | test_pixeldq_initialization |
| The GROUPDQ extensions are added to the data and all values are initialized zero. | test_groupdq_initialization |
| A DQ_DEF extension with the definition of DQ flags should be present in all products. | test_dq_def_initialization |
| Error array is a 4-D array initialized to zero. | test_err_initialization |
Test Data¶
The dq_init step is applied the same to all instruments and exposure types except the NIRSpec IRS2 mode; therefore,
we choose to test one NIRCam FULL frame image and one SUB640 subarray image.
Todo
Need NIRSpec IRS2.
Test Procedure¶
To run these tests the config.json should contain the "dq_init" section for example:
{
"dq_init": [
"dq_init/jw82600004001_02101_00001_nrcb1_uncal.fits",
"dq_init/jw82600011001_02103_00001_nrcb1_uncal.fits"
]
}
Using the above config.json simply run:
test_pipeline --config config.json
Reference/API¶
caltest.test_caldetector1.test_dq_init Module¶
Functions¶
fits_mask(fits_output) |
|
fits_output(fits_input) |
|
test_dq_def_initialization(fits_output) |
Check that a DQ_DEF extension with the definition of DQ flags is present. |
test_dq_init_step(fits_input) |
Make sure the DQInitStep runs without error. |
test_err_initialization(fits_output) |
Check that the error array is a 4-D array initialized to zero. |
test_groupdq_initialization(fits_output) |
Check that the GROUPDQ extension is added to the data and all values are initialized to zero. |
test_pixeldq_initialization(fits_output, …) |
|
translate_dq(ref_hdul) |