The STIS pipeline propagates both statistical errors and data quality flags throughout the calibration process. These are then combined from both the science data and the reference file data to produce triplets of {science, error, and data quality} in the calibrated direct and spectral imaging data.
Note that both the error and data quality image extensions may be represented with a null array (i.e.,
NAXIS=0 following STScI conventions) if all the values are identically zero (see
Table 2.8 and
STIS ISR 95-06).
The error array contains an estimate of the statistical error at each pixel. In the raw file, the error array is empty. The first step of
calstis is to calculate the error array for the input data. This raw data error is simply given as:
The bias, gain factor, and read noise are read from the CCD parameters reference file for CCD data (a _ccd file specified by keyword
CCDTAB). As the data are calibrated through the
calstis pipeline, the statistical errors are propagated through, reflecting both the science and reference file errors (see
STIS ISR 98-26 Section 6 for details).
Data quality flags are assigned to each pixel in the data quality extension. Each flag has a true (set) or false (unset) state. Flagged conditions are set as specific bits in a 16-bit integer word. For a single pixel, this allows for up to 15 data quality conditions to be flagged simultaneously, using the bitwise logical OR operation. Note that the data quality flags cannot be interpreted simply as integers but must be converted to base-2 and interpreted as flags.
Table 2.8 gives the specific conditions that are flagged, depending on the states of different bits (i.e., being on or off).
The raw data quality files will be filled only when there are missing (data lost) or dubious (software error) data. If no such errors exist, initialization will produce an empty data quality file whose header has
NAXIS=0.