roman_datamodels.dqflags
Roman Data Quality Flags
Within science data files, the PIXELDQ flags are stored as 32-bit integers; the GROUPDQ flags are 8-bit integers. All calibrated data from a particular instrument and observing mode have the same set of DQ flags in the same (bit) order. Additional details can be found in the romancal data quality flags documentation.
Tables detailing the specifics of the GROUPDQ and PIXELDQ flags are provided in
the documentation for group and pixel respectively.
Implementation
The flags are implemented as “bit flags”: Each flag is assigned a bit position in a byte, or multi-byte word, of memory. If that bit is set, the flag assigned to that bit is interpreted as being set or active.
NumPy can do bitwise operations on these integer flags, provided they are of an unsigned integer type. For our case:
GROUPDQ (
groupenum) flags are stored as 8-bit unsigned integers (uint8).PIXELDQ (
pixelenum) flags are stored as 32-bit unsigned integers (uint32).
The actual integer values for each flag are found using the formula
2**bit_number where bit_number is the 0-index bit of interest.
The flags for both pixel and group dq flags are defined as enumerations,
so that they are both organized in a consistent manner and protected against accidental
modification. This means they can be accessed like any attribute of a Python Enum.
Classes
|
Group-specific, GROUPDQ, data quality flags |
|
Pixel-specific, PIXELDQ, data quality flags |