FITS
CFITS cookbook P.Colom November 24, 1997
J.M.Martin January 13, 2004
CFITS is a tool that permits format translation between FITS format and CLASS
format. It is part of the GILDAS package.
1) to export a CLASS file toward FITS format.
CFITS> file in toto.30m ! toto.30m is a CLASS binary file
CFITS> find/all ! find all spectra
CFITS> get f ! get first spectrum
CFITS> fits\write toto.fits ! writes in FITS format (in toto.fits)
2) to import a FITS file toward CLASS format.
CFITS> read toto.fits ! reads a FITS format file
CFITS> file out toto.30m new ! creates a new CLASS file (empty)
CFITS> las\write ! writes in CLASS format (in toto.30m)
3) when there are many FITS files to import (all located in the same folder),
one should create a CFITS procedure with the following shell script:
echo "file out data.nrt new" > fits2class.pro
ls -1 foldername | awk '$1 ~ /.fits/ {print "read",$1,"\nlas\\write"}' >> fits2class.pro
echo "" >> fits2class.pro
chmod u+x fits2class.pro
remarks:
1) in order to obtain a summary of the CFITS commands:
CFITS> help fits\
2) There are a few commands that pertain to both LAS and CFITS. To distinguish
them, you must to precise the langage. Example:
CFITS> las\write ! to write in CLASS format
CFITS> fits\write ! to write in FITS format
Last modification: January 13th, 2004. P. Colom, J.-M. Martin.
W3 validator (http://www.obs-nancay.fr/nrt/support/cb_CLASS01.html)