3
FITS file handling inside Midas
4
-------------------------------
9
FITS files can be used as input and input/output files throughout Midas.
11
A FITS image file is processed as follows:
13
a) for Input/Modification
14
the FITS header is read into memory (handled via OSY_VMEM) and stored
15
as Midas descriptors (inside SCFOPN)
16
FCT.IOCHAN is set to a negative value instead of a positive file id
20
thereafter all access to the descriptors of that file proceeds
21
exactly the same as for Midas files, the switch is set at the
22
OSY_RVB + OSY_WVB level, which test for a negative file id (I/O channel)
24
the data of the FITS file are always mapped in completely, once the
25
first SCFMAP, SCFPUT or SCFGET call happens
27
if the FITS image has been modified (descr. and/or data) the internal
28
image is written to a new FITS file which is renamed to input image after
31
newly created images are always in Midas format and in the end (SCFCLO)
32
are saved as FITS file on disk
34
To produce FITS files automatically in Midas the command:
35
SET/MIDAS newfile=FITS
36
has to be executed first, which sets keyword AUX_MODE(13) to 1 (Midas format
40
A FITS table file is processed as follows:
42
a) for Input/Modification
43
the FITS header is read into memory (handled via OSY_VMEM) and stored
45
FCT.IOCHAN is set to a negative value instead of a positive file id,
46
also all table data is already mapped into memory (inside TCTOPN)
50
thereafter all access to the descriptors of that table proceeds
51
exactly the same as for Midas files, the switch is set at the
52
OSY_RVB + OSY_WVB level, which test for a negative file id (I/O channel)