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

STIS Data Handbook > Chapter 5: STIS Data Analysis > 5.6 Working with TIME-TAG Data

STIS MAMA detectors can be used in ACCUM or TIME-TAG modes, as described in Chapter 11 of the STIS Instrument Handbook. In TIME-TAG mode, the position and detection time of every photon is recorded in an event list. Detection times are recorded with 125 microsecond precision, although events from bright sources may be buffered for as long as 128 milliseconds prior to assignment of a detection time.
For TIME-TAG datasets, the HST archive returns all normal data products and also an event list in a file with a _tag suffix. The _tag file is a FITS file with binary table extensions. Files retrieved from the HST archive prior to 2001-Sep-13 have one FITS extension for each STIS buffer dump. The number of buffer dumps equals the largest integer less than or equal to the exposure time divided by the requested BUFFER-TIME, except that there is always at least one dump. Files retrieved from the HST archive from 2001-Sep-13 onwards have all buffer dumps combined into the first FITS extension. Regardless of when a _tag file was retrieved, the last extension is a list of good time intervals, indicating time intervals when events could have been detected. TIME-TAG data retrieved from the HST archive prior to 2001-Sep-13 may contain a variety of errors, including gaps in event lists, errors in event times, or flux calibration errors in extracted spectra and rectified spectral images. These errors occurred infrequently, but TIME-TAG data retrieved prior to 2001-Sep-13 should nonetheless be discarded in favor of newly retrieved data.
An event list in a _tag file is a FITS binary table extension named EVENTS, containing four columns named TIME, AXIS1, AXIS2, and DETAXIS1.
The TIME column contains the time when each event was recorded, relative to the start time (MJD) of the exposure given in the TEXPSTRT keyword of the primary FITS header. Each relative time is stored as an integer number of 125 microsecond hardware clock ticks, but application of the column SCALE FACTOR converts relative times to seconds. Application of the column SCALE FACTOR is automatic in the IRAF tables package.
The AXIS1 column contains the pixel coordinate along the spectral axis where each event was recorded plus a correction term to remove Doppler shifts introduced by the orbital motion of HST. The correction term depends on optical element and the projected orbital velocity of HST, which varies over the course of an observation. In ACCUM mode, this Doppler compensation is applied during an observation, but in TIME-TAG mode raw positions are downlinked and Doppler compensation is applied during ground processing.
The AXIS2 column contains the pixel coordinate along the spatial or cross-dispersion axis. No Doppler compensation is applied.
The DETAXIS1 column contains the pixel coordinate along the spectral axis where each event was recorded with no correction for Doppler shifts introduced by the orbital motion of HST. In general, AXIS1 coordinates are more relevant than DETAXIS1 coordinates.
After all EVENTS extensions in a _tag file, there will be one final binary table extension named GTI, containing columns named START and STOP. There will be associated start and stop times for every uninterrupted observing interval during a planned exposure. For most datasets, there will be only one START and one STOP time encompassing all buffer dumps in an exposure. Multiple good time intervals are possible, however - for example, if guide star lock is lost. Times in START and STOP are expressed in seconds since the start time (MJD) of the exposure given in the TEXPSTRT keyword of the primary FITS header. In IRAF, good time intervals can be examined using the tprint task in the tables package:
where rootname must be replaced by the rootname of the _tag file being examined.
Useful IRAF tasks for analyzing and manipulating data taken in the TIME-TAG observing mode are listed in Table 5.6.
Table 5.6: Useful IRAF Tasks for Reducing TIME-TAG Data
TIME-TAG observations with STIS have a temporal resolution of 125 microseconds. The effects on the observed times of both the orbital motion of the Earth and the HST may need to be corrected relative to the solar system barycenter. The odelaytime task creates a file of observation time events corrected for light delay from three sources: 1) general relativistic effects (up to 2 milliseconds), 2) displacement of the telescope from the center of the Earth (up to 20 milliseconds), and 3) displacement of the Earth from the solar system barycenter (up to 500 sec). The inputs to odelaytime are the TIME-TAG data and the ephemeris files. For details regarding the odelaytime task and parameters, the reader is referred to ISR STIS 2000-02.
To find and retrieve the orbital ephemeris file or files needed, you will have to use the StarView interface. Under the “searches” menu in StarView select “HST” and “datafiles”. On the search form that appears, enter “orb” in the “archive class” field, and in the “Data Start Time” field enter a range of time that extends from a few days before your observation, until a time a few days after the end time of your observation. For example, to cover times from the beginning of March 21, 2002 until the beginning of March 30, 2002, this field should contain “2002-03-21 .. 2002-03-30”. Select for retrieval all files with extensions .orx or .fit that overlap your observations. Files from before May 2, 2000 will have extension .orx, while later files will have extension .fit. After marking the desired datasets, hit the “submit” button to bring up the “HST Retrieval Configuration Options” window, and then check the “Show Override” box on this form. In the “Extensions” field that appears, enter either “fit” or “orx” depending of the file type that was selected. The “Fetch only listed extensions” box should also be checked. Then choose the desired data delivery method, and enter your archive username and password in the appropriate field, before hitting “Done”.
If one or more .orx files have been retrieved, they should be converted to .fit files using the hstephem task, e.g.,
These files can be then be used with the odelaytime task.
The inttag task in IRAF was developed to convert the TIME-TAG table (EVENTS tables) into one or more sub-exposures using a user specified time increment. The result is similar to the ACCUM mode data. The default start time here is the first value in the GTI table. The time increment value can be adjusted so that each sub-exposure has reasonable signal-to-noise. Details regarding the inttag task and its parameters are summarized in ISR STIS 2000-02.
STIS echelle TIME-TAG data that are converted to images and calibrated, will require longer processing and calibration time because they consist of many orders, especially if multiple sub-exposures are created with inttag. After converting the TIME-TAG data into an image and calibrating it, the IRAF tasks txtable can be used to extract wavelength dependent data for a single order from the _x1d file.
where [3] refers to the third sub-exposure, the desired order is 116, and the WAVELENGTH and FLUX columns are written to the output table A useful task to display echelle spectra is echplot. (See Section 3.5.2 of the Introduction to the HST Data Handbooks)
Apart from the inttag task which can be used to create sub-exposures for a fixed time interval, other tasks are also available for timing analysis of the STIS TIME-TAG data. For example, the timing analysis tasks in IRAF that are part of the xray data analysis software may be accessed and used in reducing the TIME-TAG data. However, to use STIS TIME-TAG data with the xray tasks requires that the FITS file be converted into QPOE format. In order for this conversion to be done successfully, the TIME column values must be in double precision format and the keywords such as “TIME=XS-SORT” must be in the science header. A script to convert STIS TIME-TAG FITS data into QPOE format is given in the appendix of ISR STIS 2000-02.
Many TIME-TAG datasets will consist of several EVENTS tables in a single FITS file, depending on the number of buffer dumps. In such cases it is convenient to merge them into one EVENTS table. To check the number of EVENTS binary tables one could use the IRAF task catfits. To merge the EVENTS tables in IRAF, the tmerge task should be used. More details about these tasks are provided in ISR STIS 2000-02.
After processing with inttag, the _raw data output may be calibrated using calstis. Here, the same rules apply as with STIS data taken in other modes. However, two calibration steps that require particular attention in case of TIME-TAG data are the Doppler correction and the spatial resolution correction. These are explained in detail in ISR STIS 2000-02.

Table of Contents Previous Next Index Print