spacer link to MAST page spacer logo image spacer
 
link to STScI page


Spectral WCS Information for HLSP Deliveries

[Spectral WCS Resources]  [1-D Spectrum Example

[Spectral CTYPE Keywords]  [VO Spectral Container

Spectral WCS Resources

When delivering non-extracted, 1-D or N-D spectra, the FITS files must contain a valid WCS to describe the data axes, scales and units. There is no single, absolute standard for the representation of spectral coordinates in FITS since there are many flavors of FITS spectra and no one set of keywords can cover all the bases as with WCS for imaging data. The standard is evolving; therefore we can only make recommendations as to how best to follow it. Additionally the large variety of spectral reduction software packages expect different keywords as input and produce their own sets of keywords as output. We recommend the following WCS resources for reference in building your spectra header keywords. Additional sections below provide simple examples and key excerpts from this list of WCS resources which can be used as guidelines for spectral headers.

  1. The NOAO IRAF 'Spectral WCS Conventions' web page gives a simple overview of 1-D, 2-D and 3-D spectral headers. The 1-D example is copied below for quick reference.
  2. We highly recommend following the World Coordinate System (WCS) guidelines laid out in the paper 'Representations of spectral coordinates in FITS' (Greisen et al. 2006). Some of the key tables from the paper have been copied as screen shots below for quick reference.
  3. A good reference is the summary of the reserved WCS keywords from the FITS v3.0 paper (Pence et al. 2010) paper.
  4. The IRAF documentation for the data reduction package 'onedspec' describes functions for linear and non-linear dispersion functions, with examples of several spectral headers.
  5. Additionally, we also suggest following the guidelines in the paper 'The VO-Compataple Spectra Container for HST and other Missions' (Thompson et al. 2006). This will allow MAST to more easily integrate your spectral data into the Virtual Observatory (VO) search standards. An example of a VO spectral container group of header keywords can be viewed below.


1-D Spectrum Example

The following example of a non-linear one dimensional spectrum, is taken from the NOAO IRAF 'Spectral WCS Conventions' web page.

In this example a one dimensional, 1000 point, spectrum with a non-linear (quadratic) dispersion is described by a three dimensional WCS.

Figure 1: WCS keywords for a non-linear 1D spectrum.

NAXIS  =                      1 / Number of image raster axes       
NAXIS1 =                   1000 / Number of pixels                  
CTYPE1  = 'WAVE-WAV-PLY'        / Wavelength axis                   
CUNIT1 = 'Angstrom'             / Wavelength units                  
CRVAL1  =                 5560. / Wavelength (Angstrom)             
CRPIX1 =                   500. / Reference pixel                   
CD1_1  =                    2.1 / Linear dispersion (Angstrom/pixel)
DV1_0  =                      2 / Order of non-linear function      
DV1_2  =                   499. / Normalization                     
DV1_6  =                     5. / Maximum quadratic deviation       

CTYPE2  = 'RA---TAN'            / RA axis                           
CRVAL2  =       201.94541667302 / RA reference (deg)                
CD2_2   =         -2.1277777E-4 / RA axis scale (deg/pixel)         
CRPIX2  =                    1. / Reference pixel                   

CTYPE3  = 'DEC--TAN'            / DEC axis                          
CRVAL3  =              47.45444 / DEC reference (deg)               
CD3_3   =          2.1277777E-4 / DEC axis scale (deg/pixel)        
CRPIX3  =                    1. / Reference pixel                   

credit: http://iraf.noao.edu/projects/fitswcs/spec3d.html

Back to top


Spectral CTYPE Keywords

The following tables are screen shots from the paper 'Representations of spectral coordinates in FITS' (Greisen et al. 2006). These have been copied here for quick reference:

  • Spectra coordinate type codes, (characters 1-4 of CTYPE keyword) Table 1
  • Non-Linear algorithm codes, (characters 6-8 of CTYPE keyword) Table 2
  • Recognized values for SPECSYS, SSYSOBS, and SSYSSSRC Table 12
Please see the full text of the spectra WCS paper for all tables and explanations. The quicklook tables are just a small representation of some of the required values.

Table 1: Spectra coordinate type codes, (characters 1-4 of CTYPE keyword) [Greisen et al. 2006]

Expand for Details | Retract/Close Details

Spectra CTYPE values

Table 2: Non-Linear algorithm codes, (characters 6-8 of CTYPE keyword) [Greisen et al. 2006]

Expand for Details | Retract/Close Details

Non-Linear Spectra CTYPE values

Table 12: Recognized values for SPECSYS, SSYSOBS, and SSYSSSRC [Greisen et al. 2006]

Expand for Details | Retract/Close Details

Spectra SPECSYS, SSYSOBS, SSYSSRC values

Back to top


VO Spectral Container

We suggest following the guidelines in the paper 'The VO-Compataple Spectra Container for HST and other Missions' (Thompson et al. 2006). This will allow MAST to more easily integrate your spectral data into the Virtual Observatory (VO) search standards. An example of a VO spectral container group of header keywords can be viewed below. Note that units are given after the FITS comment separator "/" within brakets "[]".

Example of VO Spectral Container Header Keyword Group [Thompson et al. 2006]

Expand for Details | Retract/Close Details

VO Spectral Container Sample