15.1 Pipeline Processing Overview

Here, we briefly summarize the basic reductions and calibrations that are performed in the STScI STIS pipeline, and summarize the effects that particular Phase II proposal parameter choices have on calibration. The material in this chapter is intended to provide only enough background to develop robust observing proposals. A series of STIS Instrument Science Reports (see a listing in Section 15.3) and the STIS Data Handbook provide the more detailed information needed for analyzing your data.

Science data taken by STIS are received from the Space Telescope Data Capture Facility and sent to the STScI pipeline, where the data are unpacked, keywords are extracted from the telemetry stream, and the science data are reformatted and repackaged into raw (uncalibrated) FITS1 files by the generic conversion process. All STIS data products are FITS files. The vast majority of the STIS data products are two-dimensional images that are stored in FITS image extension files as triplets of science, error, and data quality arrays. FITS image extensions offer great flexibility in data storage and allow us to package, together into one file, related science data that are processed through calibration as a single unit. The uncalibrated FITS files are passed through calstis, the software code that calibrates the data, producing calibrated FITS files. For more details on STIS data structure and the naming conventions for the uncalibrated and calibrated data products, see the STIS Data Handbook.

Calstis performs the following basic science data calibrations:

  • Basic, two-dimensional image reduction producing a flat-fielded output image (rootname_flt.fits), which, depending on whether the data are from the MAMA detectors or the CCD and whether they are imaging or spectroscopic data, includes the following: data quality initialization, dark subtraction, bias subtraction, non-linearity flagging, flat fielding, and photometric calibration.
  • Two-dimensional spectral extraction producing a flux-calibrated, rectified spectroscopic image (usually rootname_x2d.fits for MAMA data, rootname_sx2.fits for CCD) with distance along the slit running linearly along the Y axis and wavelength running linearly along the X axis, for spectroscopic first-order mode data. See Table 2.2 in the STIS Data Handbook.
  • One-dimensional spectral extraction producing a one-dimensional spectrum of flux versus wavelength (usually rootname_x1d.fits for MAMA data, rootname_sx1.fits for CCD), uninterpolated in wavelength space, but integrated across an extraction aperture in the spatial direction, for first-order and echelle spectroscopic data. See Table 2.2 in the STIS Data Handbook.
  • Data taken in TIME-TAG mode are corrected for the Doppler shift from the spacecraft motion and output as an uncalibrated event stream by the pipeline in a FITS binary table (rootname_tag.fits). The time-tag data stream is also integrated in time to produce an uncalibrated ACCUM mode image (rootname_raw.fits) which is then passed through standard calibration. To correct TIME-TAG spacecraft times to heliocentric times, refer to Section 5.6.1 in the STIS Data Handbook.

In addition, calstis performs two types of contemporaneous calibrations:

  • For CCD exposures which have been CR-SPLIT or when multiple exposures have been taken, calstis combines the exposures, producing a cosmic ray rejected image (rootname_crj.fits) which is then passed through subsequent calibration (e.g., spectral ­extraction).
  • For spectroscopic exposures, calstis processes the associated wavecal exposure (see Section 3.3 Routine Wavecals) to determine the zero point offset of the wavelength and spatial scales in the science image, thereby correcting for thermal drifts and the lack of repeatability of the mode select mechanism. Whereas the uncalibrated ­science data are stored in the rootname_raw.fits file, the accompanying wavecal observations are stored in the file rootname_wav.fits.

Figure 15.1 through Figure 15.3 show example outputs from the calstis pipeline. The calstis program propagates statistical errors and tracks data quality flags through the calibration process. Calstis is available to users as part of the stenv environment so they can recalibrate their data as needed.2 Recalibration may be performed in its entirety in a manner identical to the pipeline calibration by using calstis, or modular components of calstis, such as basic two-dimensional image reduction (basic2d), two-dimensional spectral extraction (x2d), one-dimensional spectral extraction (x1d), or cosmic ray rejection (ocrreject). The calibration steps that calstis performs on a given set of science observations depends on the nature of those observations.3

Between Spring 2001 and Fall 2016, calibrated data products for STIS were available through on-the-fly-reprocessing (OTFR), which replaced on-the-fly-calibration (OTFC). The OTFR system started with raw telemetry products, converted these to FITS files, and added the latest instrument calibrations.

Since 2016, the MAST archive has changed from using OTFR to a pre-calibrated data cache for STIS to directly deliver raw and calibrated products without the need to wait for reprocessing and recalibration. When new reference files are submitted, the intent is that all affected data sets will be promptly reprocessed and the cache updated. This allows much faster access to HST data than is possible with OTFR, however, this may result in a delay between the submission of revised reference files and their application to the cached data. Users who require data calibrated with the most recently updated reference files may wish to consult with the STIS team to verify via the HST Help Desk when calibrated products made using these updated files will be available.

Users can manually update reference files in the headers of the raw files using the crds.bestrefs script.

Calstis evolves and improves with time as we understand and characterize the on-orbit performance of STIS more fully. For details about the various changes made to the STIS calibration processes, please refer to the STIS Data Handbook.

Observers can retrieve HST data through the MAST Portal, HST Archive resources or can use the Astropy module astroquery.mast to query and download data.

Figure 15.1: Two-Dimensional Rectification

Figure 15.2: Cosmic Ray Rejection

Figure 15.3: One-Dimensional Spectral Extraction

1 Flexible Image Transport System.

2 The calstis software is mostly written in C and uses open python in conjunction with a ­specially written I/O interface to the FITS data file.

3 Available-but-unsupported-mode data are calibrated only through flat fielding in the pipeline.