To write a FITS file from CLASS data, use the following command:
FITS WRITE Filename[.fits] [/BITS Nbits] [/MODE SPECTRUM|INDEX]
The command will create a simple FITS file from the current Spectrum (in SPECTRUM mode), or a FITS BINTABLE from the current Index (in INDEX mode). The number of bits can be controlled. Default values for the mode and the number of bits can be supplied by the SET FITS command.
SET FITS BITS Nbits SET FITS MODE Spectrum|Index|NoneIn INDEX mode, it is up to the user to make sure that the index is consistent (same number of channels, etc..., for all spectra in index).