next up previous contents index
Next: Bibliography Up: Conversion between FITS and Previous: Reading FITS

   
Writing FITS

Translation of MIDAS files to FITS format is done by the OUTTAPE command:
OUTTAPE cat[,list] device [flag] [dens,block] [type]
where the cat[,list] is a catalogue of files to be written with an optional list of numbers (see CREATE/xCAT for creation of catalogues). It can be defaulted by giving either `*' or `?' in which case all files in catalogues set by the SET/xCAT command are written out. A single file can be written by specifying it with its full name including extension. The device may specify an actual tape device, a prefix for disk files or an explicit file name for a single file.

The flag is an optional list of three one-character flags specifying the append mode, the amount of information listed on the senior terminal and in the log file and if the LHCUTS descriptor in the file should be used for scaling (see help file for full description).

Although the OUTTAPE command in principle can be used to write FITS files directly to disk, it is not convenient due to the naming scheme used. A better command for this purpose is:

OUTDISK/FITS in_files [out_spec] [option] [out_type]
where in_files specifies the files to be converted to FITS (note: wildcard characters are supported). The out_spec can be used to control the names of the resulting FITS files where the basename of the input frame can be specified by given the string NAME=INPUT. For a more detailed description of the command check with the help-text.

Note
The default options of the OUTTAPE command will start at the current tape position. This may over-write previous data on the tape. Be sure to use the append flag if files have to be added to the tape. Or position the tape at end-of-information using operating system utilities before writing new files. Also use a non-rewind device name (e.g. /dev/nst1) when specifying a physical device - otherwise the operating system may rewind the tape by itself!

The dens,block parameter can specify the tape density (e.g. 1600 or 6250bpi) and a physical blocking factor in the range 1-10. By default, a blocking factor of 10 is used. Note that some old FITS readers may not be able to read blocked FITS files (e.g. IHAP) in which case a blocking on 1 must be given explicitly. The tape density is used only for 9-track 1/2-inch tapes. Some 1/2-inch tape devices require the density also to be set manually on the drive.

The type flag is used to specify the type of FITS format to write where `B' indicates basic FITS i.e. with integer format only. The default is `O' for original including floating point representation.


next up previous contents index
Next: Bibliography Up: Conversion between FITS and Previous: Reading FITS
http://www.eso.org/midas/midas-support.html
1999-06-09