Space Telescope Science Institute
STIS Data Handbook 6.0 May 2011
Table of Contents Previous Next Index Print

STIS Data Handbook > Chapter 2: STIS Data Structure > 2.5 Error and Data Quality Array

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:
R is the observed data number (counts) minus the electronic bias of the pixel; note that the electronic bias is zero for the MAMA.
g is the gain factor; note that the gain is unity for MAMA observations.
σc is the read noise in electrons for CCD observations (it is set to zero for MAMA observations).
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.
These flags are set and used during the course of calibration, and may likewise be interpreted and used by downstream analysis applications.
Table 2.8: STIS Data Quality Flags
FLAG Value
0000 0000 0000 0001
0000 0000 0000 0010
0000 0000 0000 0100
0000 0000 0000 1000
0000 0000 0001 0000
Pixel having dark rate > 5 σ times the median dark level.
0000 0000 0010 0000
0000 0000 0100 0000
0000 0000 1000 0000
0000 0001 0000 0000
Saturated pixel, count rate at 90% of max possible—local non-linearity turns over and is multi-valued; pixels within 10% of turnover and all pixels within 4 pixels of that pixel are flagged.
0000 0010 0000 0000
0000 0100 0000 0000
Small blemish, depth between 40% and 70% of the normalized flat. Applies only to MAMA p-flats at present.
0000 1000 0000 0000
0001 0000 0000 0000
0010 0000 0000 0000
0100 0000 0000 0000

The most significant bit is on the left in this representation.

Table of Contents Previous Next Index Print