COS Data Handbook v.4
help@stsci.edu
Table of Contents Previous Next PDF


COS Data Handbook > Chapter 2: COS Data Files > 2.3 COS File Structures

2.3
All COS data products are Multi-Extension FITS (MEF) format files and begin with a primary data unit which includes only a header with no data extension. The info() function in the astropy.io.fits Python module can be used to list the complete set of extensions and their data formats for the COS data files. For more information on using astropy.io.fits, please refer to Chapter 5.
2.3.1 COS FITS Table Extension Files
Tabular COS information, such as extracted one-dimensional spectra or the TIME-TAG mode event series, are stored as FITS binary tables. The tables can be accessed directly in the AstroConda (an STScI Python distribution) environment using the astropy.table.Table module as described in Section 5.1.2 of this document, or with other standard FITS tools.
2.3.2 COS FITS Image Extension Files
COS images and two-dimensional spectroscopic data are stored in FITS image extension files, which can be directly manipulated, without conversion, in the AstroConda environment. Accessing images in the FITS image extension files in Python requires use of the astropy.io.fits module and the images can be displayed with the matplotlib package. Figure 2.1 illustrates the structure of a COS FITS image extension file, which contains:
Figure 2.1: FITS Image Extension File for COS
1. Not all COS image extension files will contain the ERR and DQ extensions.
The following file types are stored in FITS image extension files with the particular format shown in Figure 2.1: rawaccum, flt, counts, pha and rawacq1. Each COS readout can generate one FITS image SCI extension or three FITS image extensions (SCI, ERR, and DQ) as explained below:
The error arrays and data quality values are described in more detail in Section 2.7. The value of the EXTNAME keyword in the extension header identifies the type of data the extension contains; the value of this keyword may be determined using the convenience function getval() in the astropy.io.fits module using Python. For example, to see the value of EXTNAME of extension 1 of ldel05ivq_rawtag_a.fits:
 
1
Only ACQ/IMAGE files use the exact format shown in Figure 2.1. For more details on acquisition file formats see Acquisition Files (RAWACQ) in Section 2.4.4.


COS Data Handbook > Chapter 2: COS Data Files > 2.3 COS File Structures

Table of Contents Previous Next PDF