next up previous contents index
Next: LAS Language Internal Help Up: CLASS Continuum and Line Previous: Advanced Processing

From CLASS to FITS

To bring back CLASS spectra to your home institution, where the CLASS format may not be supported, CLASS offers the possibility of writing standard FITS format tapes. A program named CFITS is used to perform CLASS to FITS conversion (and vice-versa). For a description of the FITS format see the original paper by Wells et al. (Astron. and Astrophys. Suppl.). CFITS contains two languages, LAS tex2html_wrap_inline2098 and FITS tex2html_wrap_inline2098 .

The LAS tex2html_wrap_inline2098 language is a subset of the language used in CLASS program, and contains only the following commands.

          CLEAR           DEVICE         DROP           DUMP
          FILE            FIND           GET            HARDCOPY
          HEADER          IGNORE         LIST           PLOT     
          SET             SHOW           SWAP           TAG          
          UPDATE          WRITE

The FITS tex2html_wrap_inline2098 language contains the following commands

FITS headers written by CFITS depend on the informations present in the corresponding CLASS headers. Any missing information will also be omitted in FITS (and vice versa). A typical FITS header written by CFITS looks like this :

SIMPLE  =                    T         /
BITPIX  =                   16         /
NAXIS   =                    4         /                            (1)
NAXIS1  =                  253         /                            (2)
NAXIS2  =                    1         /                            (3)
NAXIS3  =                    1         /                            (3)
NAXIS4  =                    1         /                            (3)
BSCALE  =  0.1038147092913E-03         /
BZERO   = -0.2413805246353E+01         /
DATAMIN = -0.5815605640411E+01         /
DATAMAX =  0.9877878427505E+00         /
BUNIT   = 'K       '                   /                            (4)
CTYPE1  = 'FREQ    '                   /                            (5)
CRVAL1  =  0.0000000000000E+00         / Offset frequency 
CDELT1  =  0.1000000014901E+06         / Frequency resolution
CRPIX1  =  0.1345000000000E+03         /
CTYPE2  = 'RA      '                   /                            (6)
CRVAL2  =  0.8388750229169E+02         /
CDELT2  = -0.5555555975722E-02         /
CRPIX2  =  0.0000000000000E+00         /
CTYPE3  = 'DEC     '                   /                            (6)
CRVAL3  = -0.1777777752148E+01         /
CDELT3  =  0.0000000000000E+00         /
CRPIX3  =  0.0000000000000E+00         /
CTYPE4  = 'STOKES  '                   /                            (7)
CRVAL4  =      1.0000000000000         /
CDELT4  =      0.0000000000000         /
CRPIX4  =      0.0000000000000         /
TELESCOP= 'IRAM-30M-B20'               / 
OBJECT  = 'ORI-I-2     '               /
GLAT    =  0.0000000000000E+00         / Galactic latitude          (8)
GLON    =  0.0000000000000E+00         / Galactic longitude         (8)
EPOCH   =  0.1950000000000E+04         /                            (9)
BLANK   =  0.9878914356232E+00         / Blanking value
LINE    = '*           '               / Line name                  (10)
RESTFREQ=  0.1152712040000E+12         / Rest frequency             (11)   
VLSR    =  0.1300000000000E+05         / Velocity of ref. channel   (12)
DELTAV  = -0.2600757479668E+03         / Velocity resolution        (13)
IMAGFREQ=  0.1074062118530E+12         / Image frequency            (14)
TSYS    =  0.4787839660645E+03         / System temperature         (15)
OBSTIME =  0.7500000000000E+02         / Integration time           (16)
SCAN-NUM=  0.4386000000000E+04         / Scan number                (17)
TAU-ATM =  0.8740132451057E+00         / Atmospheric opacity        (18)
NPHASE  =                    2         / Number of frequency phases (19)
DELTAF1 = -0.5000000000000E+07         / Frequency offset Phase 1   (20)
PTIME1  =  0.3750000000000E+02         / Duration of Phase 1        (20)
WEIGHT1 =  0.1000000000000E+01         / Weight of Phase 1          (20)
DELTAF2 =  0.5000000000000E+07         / Frequency offset Phase 2   (20)
PTIME2  =  0.3750000000000E+02         / Duration of Phase 2        (20)
WEIGHT2 = -0.1000000000000E+01         / Weight of Phase 2          (20)
BEAMEFF =  0.56                        / Beam efficiency            (21)
FORWEFF =  0.88                        / Forward efficiency         (22)
GAINIMAG=  1.0000000000000E+00         / Image sideband gain ratio  (23)
ORIGIN  = 'LAS-Grenoble-VAX'           /
DATE    = ' 7/ 9/85'                   / Date written 
DATE-OBS= '29/ 5/85'                   / Date observed
DATE-RED= ' 7/ 9/85'                   / Date reduced
ELEVATIO=  0.5064780612975E+02         /  Telescope elevation     (24)
AZIMUTH =  0.1919660046612E+03         /  Telescope azimuth 
UT      = '12:50:47.384'               / Universal time at start 
LST     = '06:09:00.479'               / Sidereal time at start of observation
HISTORY REL  0.5064780612975E+02       /  Telescope elevation     (24)
HISTORY RAZ  0.1919660046612E+03       /  Telescope azimuth 
HISTORY RUT  12:50:47.384    Universal time at start of observation    
HISTORY RST   6:09:00.479    Sidereal time at start of observation
HISTORY SCAN LIST 4383-4386                                         (25)
END

  1. Although only one axis is really necessary, it is very convenient to define four, use the first one for the channels, and the three last ones to code the positions and stokes parameters.
  2. The first axis is used to define effectively the spectrum. Thus NAXIS1 is the number of channels.
  3. NAXIS2, NAXIS3, and NAXIS4 are all one for a single spectrum. Note however that it is possible to store a raster map with a similar header as this one.
  4. Could be Janskys
  5. First axis defined in terms of frequency (in the signal sideband in case of double sideband operations). The frequency of a specific channel is given by
    F(i) = RESTFREQ + CRVAL1 + ( i - CRPIX1 ) * CDELT1
    in which the Rest frequency RESTFREQ is defined later in the header.
  6. Second axis, Right Ascension RA (as in this case) or Galactic Longitude GLON. The information as presented here is slightly incomplete, since it would be in general necessary to have an information about the kind of projection used. On most radio telescopes, it is simply assumed that the angular offset in RA is divided by the cosine of Declination to represent ``true'' angular offsets (valid only for a small field). Small telescopes may need more elaborate projection systems. In the current example, the position really observed is
    Dec = CRVAL3 + ( 1 - CRPIX3 ) * CDELT3
    Ra = CRVAL2 + ( 1 - CRPIX2 ) * CDELT2 / COS(Dec)
    That is, CDELT2 and CDELT3 represents angular offsets from the reference position (CRVAL2,CRVAL3) in a Global Sinusoidal projection (RADIO projection).
  7. Stokes parameters as defined in the basic paper of Wells et al.
  8. Galactic latitude and longitude of the reference position, i.e. of the position (CRVAL2,CRVAL3). If one was using galactic coordinates instead of equatorial ones, the RA and DEC would appear here instead.
  9. Epoch of these coordinates
  10. Molecular line name, for bookkeeping
  11. Rest frequency
  12. LSR Velocity of the reference channel. Heliocentric velocities can be used also.
  13. Velocity spacings of the channels. This information is duplicate with the rest frequency and frequency spacing of channels, but convenient. The velocity of a given channel is thus given by
    V(i) = VLSR + ( i - CRPIX1 ) * DELTAV
  14. Image frequency, for double sideband operation.
  15. System temperature, necessary for some weighting when adding a number of spectra.
  16. Integration time, used for the same reason as above.
  17. Scan number, for bookkeeping.
  18. Atmospheric opacity in the signal sideband.
  19. For multi-phased spectra (i.e. frequency switching) number of phases.
  20. For each phase, the frequency offset, the phase length and weight.
  21. The telescope beam efficiency
  22. The telescope forward efficiency
  23. The ratio of gains in the image and signal sidebands (in case of double sideband operation)
  24. Some ``History'' comments. Whether this information should be given with specific keywords or in an History record is still an open question. This information is not really needed for further data reduction, but it helps bookkeeping.
  25. The list of scan numbers of the spectra added to produce this one.

The FITS interface for Continuum data is still experimental. Try it, and send your comments...

A minimal number of keywords has been defined as part of the FITS standard, but additional ones can be (and have been) added by various groups. Thus, several ``flavors'' of FITS coexist. Unknown keywords are normally ignored, but CFITS supports keyword redefinition. If you receive a tape with scan number coded as NUMBER (instead of SCAN-NUM), all you need to do is to define a SIC symbol named NUMBER with translation SCAN-NUM. This is done by typing SIC tex2html_wrap_inline2098 SYMBOL NUMBER SCAN-NUM

The IAU FITS committee is currently revising some definitions of the FITS format, in particular to allow projection information to be written, and sub-keywords in a single line. Hence, it is more than likely that the FITS format produced by CLASS will be modified next year. Nonetheless, older tapes written by CFITS (or any compatible program) will forever be acceptable as input. We also plan to keep (as an option) the capability to write tapes with the present format for a long time (a few years).


next up previous contents index
Next: LAS Language Internal Help Up: CLASS Continuum and Line Previous: Advanced Processing

lucas@iram.fr