From 2539b5122e54db5a6b378bbf4cee4c31f4bc9c63 Mon Sep 17 00:00:00 2001 From: PaulHuwe Date: Wed, 26 May 2021 21:03:29 -0400 Subject: [PATCH 1/3] Added RTD for masks. --- docs/roman/includes/dq_def.inc | 18 +++---- .../roman/references_general/mask_reffile.inc | 50 +++++++++++++++++++ .../references_general/mask_selection.inc | 12 +++++ .../references_general/references_general.rst | 10 ++-- 4 files changed, 78 insertions(+), 12 deletions(-) create mode 100644 docs/roman/references_general/mask_reffile.inc create mode 100644 docs/roman/references_general/mask_selection.inc diff --git a/docs/roman/includes/dq_def.inc b/docs/roman/includes/dq_def.inc index 10ef1735e..5f0378b3d 100644 --- a/docs/roman/includes/dq_def.inc +++ b/docs/roman/includes/dq_def.inc @@ -1,14 +1,14 @@ -The DQ_DEF extension contains the bit assignments used in the DQ array. +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 -=========== ======= =============================================== +=========== =========== ================================================= +Flags Data Type Description +=========== =========== ================================================= +BIT int32 The bit number, starting at zero +VALUE uint32 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: :ref:`Data Quality Flags`. diff --git a/docs/roman/references_general/mask_reffile.inc b/docs/roman/references_general/mask_reffile.inc new file mode 100644 index 000000000..2e6f70da6 --- /dev/null +++ b/docs/roman/references_general/mask_reffile.inc @@ -0,0 +1,50 @@ +.. _mask_reffile: + +MASK Reference File +------------------- + +:reftype: MASK +:Data model: `~romancal.datamodels.MaskModel` + +The MASK reference file contains pixel-by-pixel DQ flag values that indicate +problem conditions. + +.. include:: ../references_general/mask_selection.inc + +.. include:: ../includes/standard_keywords.inc + +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 :ref:`mask_selectors`): + +=============== ====================================== ============== +Attribute Fully qualified path Instruments +=============== ====================================== ============== +detector model.meta.instrument.detector WFI +=============== ====================================== ============== + + +Reference File Format ++++++++++++++++++++++ +MASK reference files are ASDF format, with 2 data objects. +The format and content of the file is as follows: + +======= ============ ============== ============= +Data Object Type Dimensions Data type +======= ============ ============== ============= +dq NDArray 4096 x 4096 uint32 +dq_def Table TBD +======= ============ ============== ============= + +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. + +The ASDF file contains a single dq array and dq flag definition table. + +.. include:: ../includes/dq_def.inc diff --git a/docs/roman/references_general/mask_selection.inc b/docs/roman/references_general/mask_selection.inc new file mode 100644 index 000000000..471c7362f --- /dev/null +++ b/docs/roman/references_general/mask_selection.inc @@ -0,0 +1,12 @@ +.. _mask_selectors: + +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 Metadata +============ ========================================================== + WFI instrument, detector, date, time +============ ========================================================== diff --git a/docs/roman/references_general/references_general.rst b/docs/roman/references_general/references_general.rst index b3914ef91..64d795de7 100644 --- a/docs/roman/references_general/references_general.rst +++ b/docs/roman/references_general/references_general.rst @@ -36,23 +36,27 @@ Most reference files have a one-to-one relationship with calibration steps, e.g. there is one step that uses one type of reference file. Some steps, however, use several types of reference files and some reference file types are used by more than one step. The tables below show the correspondence between pipeline steps and -refernece file types. The first table is ordered by pipeline step, while the second +reference file types. The first table is ordered by pipeline step, while the second is ordered by reference file type. Links to the reference file types provide detailed documentation on each reference file. +---------------------------------------------+--------------------------------------------------+ -| Pipeline Step | Reference File Type (REFTYPE) | +| Pipeline Step | Reference File Type (reftype) | +=============================================+==================================================+ +---------------------------------------------+--------------------------------------------------+ | :ref:`flatfield ` | :ref:`FLAT ` | +---------------------------------------------+--------------------------------------------------+ +| :ref:`dq_init ` | :ref:`MASK ` | ++---------------------------------------------+--------------------------------------------------+ +--------------------------------------------------+---------------------------------------------+ -| Reference File Type (REFTYPE) | Pipeline Step | +| Reference File Type (reftype) | Pipeline Step | +==================================================+=============================================+ | :ref:`FLAT ` | :ref:`flatfield ` | +--------------------------------------------------+---------------------------------------------+ +| :ref:`MASK ` | :ref:`dq_init ` | ++--------------------------------------------------+---------------------------------------------+ .. _`Standard ASDF metadata`: From b96ee16b26b632b557144ecb9b28f0d465da14ea Mon Sep 17 00:00:00 2001 From: PaulHuwe Date: Fri, 28 May 2021 00:07:49 -0400 Subject: [PATCH 2/3] Removed link to dq_init and updated changelog. --- CHANGES.rst | 2 ++ docs/roman/references_general/references_general.rst | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 9cf526ade..0d136dbbd 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,8 @@ general - Update setup for more strict PEP8 checking [#176] +- Added documentation fo rmask files. [#181] + datamodels ---------- diff --git a/docs/roman/references_general/references_general.rst b/docs/roman/references_general/references_general.rst index 64d795de7..c8fb3bd99 100644 --- a/docs/roman/references_general/references_general.rst +++ b/docs/roman/references_general/references_general.rst @@ -46,7 +46,7 @@ documentation on each reference file. +---------------------------------------------+--------------------------------------------------+ | :ref:`flatfield ` | :ref:`FLAT ` | +---------------------------------------------+--------------------------------------------------+ -| :ref:`dq_init ` | :ref:`MASK ` | +| dq_init TBD | :ref:`MASK ` | +---------------------------------------------+--------------------------------------------------+ @@ -55,7 +55,7 @@ documentation on each reference file. +==================================================+=============================================+ | :ref:`FLAT ` | :ref:`flatfield ` | +--------------------------------------------------+---------------------------------------------+ -| :ref:`MASK ` | :ref:`dq_init ` | +| :ref:`MASK ` | dq_init TBD | +--------------------------------------------------+---------------------------------------------+ .. _`Standard ASDF metadata`: From 29e4b34964b51b01764df695de3d564d9bfddff0 Mon Sep 17 00:00:00 2001 From: PaulHuwe Date: Fri, 28 May 2021 01:28:08 -0400 Subject: [PATCH 3/3] Removed link to mask (requiring dq). --- docs/roman/references_general/references_general.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/roman/references_general/references_general.rst b/docs/roman/references_general/references_general.rst index c8fb3bd99..328a0bf04 100644 --- a/docs/roman/references_general/references_general.rst +++ b/docs/roman/references_general/references_general.rst @@ -46,7 +46,7 @@ documentation on each reference file. +---------------------------------------------+--------------------------------------------------+ | :ref:`flatfield ` | :ref:`FLAT ` | +---------------------------------------------+--------------------------------------------------+ -| dq_init TBD | :ref:`MASK ` | +| dq_init TBD | MASK TBD with DQ | +---------------------------------------------+--------------------------------------------------+ @@ -55,7 +55,7 @@ documentation on each reference file. +==================================================+=============================================+ | :ref:`FLAT ` | :ref:`flatfield ` | +--------------------------------------------------+---------------------------------------------+ -| :ref:`MASK ` | dq_init TBD | +| MASK TBD with DQ | dq_init TBD | +--------------------------------------------------+---------------------------------------------+ .. _`Standard ASDF metadata`: