STScI Logo

Hubble Space Telescope
COS Data Quality Flags

Every photon event in a COS corrtag file has a Data Quality (DQ) flag. Each flagged condition sets a specific bit in the 16-bit DQ word, thus allowing each event during an exposure to be flagged with multiple conditions using the bitwise logical OR operation. The DQ flag values are listed in the table below. These flags can be divided into four types:

Spatial flags mark events which fall on a detector region which may be questionable. The BPIXTAB reference file marks the corners of each region on the detector which falls into each of these categories. Separate BPIXTAB files are used for the FUV and NUV detectors. These regions were determined by visual inspection of a set of science data files.For FUV data, the GSAGTAB is applied along with the BPIXTAB. The GSAGTAB is used to flag regions that are severely gain sagged

The DQICORR step of calcos maps these spatial regions to the individual photon events, and the X1DCORR module (extraction step) uses these flags and the value of SDQFLAGS (Serious Data Quality FLAGS) header keyword to create the DQ and DQ_WGT arrays, and ultimately which events to include in the final (x1dsum) spectrum (Section 3.4.13). The SDQFLAG default values corresponding to the different configurations are displayed in the table at the end of this section.

The spatial flags include:

Temporal flags mark photons that occur during time spans in which the data quality is suspect. Events flagged in this way will be discarded by calcos at the extraction step, and the exposure time will be adjusted accordingly. Two types of temporal flags are used:

Event flags are set by calcos if a photon event falls outside defined thresholds. Currently, two flags fall into this category:

Lost Data flags occur if data is missing or corrupt for some reason, such as errors in transmitting the data from the instrument to the ground. Data marked with these flags is always excluded from the final products. There are two flags in this category:

COS Data Quality Flags

Flag ValueQuality ConditionTypeFUV or NUV
0No anomalous condition notedN/ABoth
1Reed-Solomon errorLost DataBoth
2[Currently unused]N/AN/A
4Detector ShadowSpatialBoth
8Poorly calibrated region (including detector edge)SpatialBoth
16Dead spotSpatialBoth
32Background featureSpatialBoth
128Pixel out of boundsSpatialBoth
256Fill DataLost DataBoth
512Pulse height out of boundsEventFUV
1024Low response region (>50% depression)SpatialBoth
2048Bad time intervalTemporalBoth
4096Low PHA featureSpatialBoth
8192Gain-Sag holeSpatialFUV
16384[Currently unused]N/AN/A

COS Serious Data Quality Flags (SDQFLAGS)

SDQFLAG Value Configuration
8344 FUV
184 NUV