This is a server routine for FITSIN/FITSDIN. It
packages up the operations required to handle a FITS ASCII table file and turn it into an ASCII
catalogue and SCAR description file. The names of the output files are recorded in the logfile.
CALL FTS1_SCTAB( HEADER, PNDSCF, PNTAB, MEDIUM, MD, NCARD, SCARD, :
NDIM, DIMS, LOGHDR, FD, CFN, SUBFIL, PREFIX, : AUTO, BLKSIZ, ACTSIZ, BFPNTR,
OFFSET, CURREC, : RCPNTR, STATUS )
HEADER( NCARD ) = CHARACTER
80 (Given)
The FITS headers in 80-character records.
PNDSCF = CHARACTER
(
) (Given)
The name of the parameter by which the filename of the SCAR description file will be obtained.
PNTAB =
CHARACTER
( ) (Given)
The name of the parameter by which the filename of the table will be obtained.
MEDIUM = CHARACTER
(
)
(Given)
The medium containing the FITS file. Currently supported are ’
DISK’
for a disk file, and ’
TAPE’
for standard magnetic tape.
MD = INTEGER (Given)
The tape or file descriptor
depending on the value of %MEDIUM.
NCARD = INTEGER (Given)
The number of card
images in the buffer.
SCARD = INTEGER (Given)
The number of the card from where
the searches of the header will begin. This is needed because the headers make contain a
dummy header prior to an extension.
NDIM = INTEGER (Given)
Dimensionality of
the table. At present only 2-d is supported.
DIMS( NDIM ) = INTEGER (Given)
The
dimensions of the table.
LOGHDR = LOGICAL (Given)
If true there is a log file open
and records of the output file names will be written to it.
FD = INTEGER (Given)
The
file descriptor for the log file. It is ignored if %LOGHDR is false.
CFN = CHARACTER
(
)
(Given)
The number on the tape of the FITS file being processed if MEDIUM is ’
TAPE’
, or the input
disk-FITS filename if MEDIUM is ’
TAPE’
.
SUBFIL = INTEGER (Given)
The number of the
sub-file/extension within the current FITS file being processed.
PREFIX = CHARACTER
(
) (Given)
The prefix to be given to the file name of catalogues produced in automatic
mode. It is ignored when %MEDIUM = ’
DISK’
.
AUTO = LOGICAL (Given)
If true
the processing should be done in automatic mode, where the user is not prompted for
file names, since these are generated from the prefix, file and sub-file numbers in the case
where the medium is tape. The form is prefix_file or prefix_file_subfile if the subfile is
greater than 1. %MEDIUM = ’
DISK’
the prefix is ignored.
BLKSIZ = CHARACTER
(
) (Given
and Returned)
The maximum block size and dimension of %BUFFER.
ACTSIZ = CHARACTER
(
)
(Given and Returned)
The actual block size on tape or disk (a multiple of the FITS record length of
2880 bytes). It is only an input argument for %MEDIUM = ’
DISK’
.
BFPNTR = INTEGER (Given)
Pointer to the buffer containing catalogue data, the buffer itself will be updated each time a tape block
is read. If the offset equals the block size then the existing data in the buffer will not be
used.
OFFSET = INTEGER (Given and Returned)
The number of bytes in the current
block already interpreted as the header plus any earlier FITS files.
CURREC = LOGICAL
(Given and Returned)
If true the current FITS record is to be used immediately, i.e. it
has alrady been read from tape or disk into %RECORD.
RCPNTR = INTEGER (Given)
A pointer to the buffer to hold the current FITS record of 36 80-character card images.
STATUS = INTEGER (Given and Returned)
The global status.