11.2 COS Data Files

When data are taken in TIME-TAG mode (the default), the raw data are in the form of a table of photon events containing the arrival time, x and y pixel coordinates, and pulse height (for FUV data) for each photon detected. Raw ACCUM data are in the form of a 2-D image. For ACCUM FUV data, there will be two raw files for each exposure, one file for Segment A and one for Segment B. For ACCUM NUV data, there will be one raw file for each exposure.

The calibrated data have the same general format for both FUV and NUV, although there are differences in detail. There is a "corrtag" file (the file name contains the string "corrtag") containing a corrected events table. The corrtag table includes all of the columns from the raw data file, plus these additional columns: a weight that accounts for the flat-field and dead-time corrections, a data-quality column, and a column that gives the pulse-height amplitude of each event. (Codes for the DQ flags are listed in the COS Data Handbook.) The corrtag file provides several sets of corrected pixel coordinates for each event. These include X[Y]CORR, which are corrected for thermal drifts in the detector electronics, geometric distortions in the detector; and Y walk; XDOPP, which are the x coordinates corrected for orbital Doppler motions; X[Y]FULL, which are the XDOPP and YCORR coordinates corrected for OSM drift and recast into a coordinate system defined by the WAVECAL spectrum; and WAVELENGTH, which provides the wavelength corresponding to the XFULL coordinate. The corrtag file has a separate extension containing timeline information. It provides second-by-second values for the spacecraft position, solar and target altitude above the horizon, and count rates for the most prominent airglow lines and the background. The data in this extension can be useful when reprocessing TIME-TAG data, allowing the user to exclude, for example, data obtained during orbital day. The costools package offers a tool called timefilter for this purpose. For ACCUM data, the corrtag table has the same format, but all the values in the TIME column are a constant, half the exposure time. There is one row in this pseudo-TIME-TAG table for each count in the raw ACCUM image.

Additional calibrated files include the flt and counts images, which are created by binning the events in the corrtag table. Both images have units of counts/s, but the flt image is also corrected for flat-field and dead-time effects. For spectroscopic data, a 1-D extracted spectrum (or three spectra, for NUV exposures) will be written to an x1d file for each exposure. For data in an association (whereby multiple exposures are processed together—the usual case), the 1-D spectra for separate exposures will be averaged and written to an x1dsum table. If multiple FP-POS settings are used, there will be one x1dsum file for each FP-POS (x1dsum[1,2,3,4]), even if only one spectrum was obtained at each position. The distinction between the x1d and x1dsum files in such cases is that the DQ_WGT column of the x1d files (the data-quality weights) are used to eliminate bad or suspect data,such as detector dead spots. The x1dsum file without a number is the final sum of all of the exposures. It can be a weighted mean of all the x1dsum[n] files or, if a single exposure was obtained at a single FP-POS setting, a copy of the x1d file with the DQ_WGTs applied.

By default CalCOS will combine data taken at different FP-POS settings, but not at different central wavelengths.  A new association is created when either the grating or central wavelength is changed, and CalCOS only combines data within an association.

Wavelength calibration can be performed in either of two ways. The default is to take line-lamp exposures ("wavecal" exposures) simultaneously with the science data (if performing observations at LP1-5) or via SPLIT wavecal exposures automatically inserted before and after the science exposures (if performing observations at LP6). In these cases, the wavecal spectra will be extracted and saved in lampflash tables. The alternative is to take separate wavecal exposures interspersed with the science exposures. These wavecals will be calibrated in the same way as science exposures, except that the calibrated wavecal data (corrtag, flt, counts, x1d) will not be corrected for the offset of the spectrum from the template, and no x1dsum file will be created for a wavecal.