- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑
Description:
This
routine reads selected files off a FITS tape or disk and writes the header data into an HDS
file, and they are reported to the user. The dimension of the HDS buffer array in the HDS
structure is enlarged if the buffer is filled. The number of bytes of header cards in the last
data block (of the current file) containing header data is returned. This is to enable other
routines to know where the data array starts in that buffer. If this number equals the actual
blocksize this means a new data block needs to be read to access the data array.
Invocation
CALL FTS1_PHEAD( BFPNTR, RCPNTR, RECORD, MEDIUM, MD, LOC, BLKSIZ, : MAXHDR,
REPORT, ACTSIZ, OFFSET, CURREC, HSTART, : HDNUM, EXTEND, NHEADS, STATUS )
Arguments
BFPNTR = INTEGER (Given)
Pointer to the BUFFER byte array
RCPNTR =
INTEGER (Given)
Pointer to the RECORD byte array
RECORD( 36 ) = CHARACTER
( 80 )
(Given and Returned)
The buffer to hold the current FITS record. Note that this out of
order for SGP/16, but it is needed here so that a mapped array may be passed. This is
a temporary kludge until the FITS readers are redesigned.
MEDIUM = CHARACTER
(
) (Given)
The medium containing the FITS file. Currently supported is ’
DISK’
for a disk file.
MD = INTEGER
(Given)
The tape or file descriptor depending on the value of %MEDIUM.
LOC = CHARACTER
(
DAT__SZLOC ) (Given)
The locator to the HDS object that will contain the header cards.
BLKSIZ =
INTEGER (Given)
The maximum blocksize and dimension of the data buffer.
MAXHDR =
INTEGER (Given)
The maximum number of header sections in the current sub-file.
REPORT =
LOGICAL (Given)
If true the header cards are reported to the user.
ACTSIZ = INTEGER (Given and
Returned)
The actual block size (a multiple of the FITS record length of 2880 bytes). It is
only an input argument for %MEDIUM = ’
DISK’
.
OFFSET = INTEGER (Given and
Returned)
The number of bytes in the current block already interpreted as the header plus
any earlier sub 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. On exit it is true when a new record has been read to determine whether or
not there is an extension, but no extension is found.
HSTART( MAXHDR ) = INTEGER
(Returned)
The number of the header card where each FITS header starts.
HDNUM(
MAXHDR ) = INTEGER (Returned)
The number of header records processed and stored
in the output data structure, one per header section in the current sub-file.
EXTEND
= LOGICAL (Returned)
If true there are extensions in the FITS sub-file.
NHEADS =
INTEGER (Returned)
The number of header sections in the sub-file. This includes dummy
FITS header sections.
STATUS = INTEGER (Given and Returned)
Global status value.
- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑