FTS1_RDATA

Reads the data of a FITS file on disk or tape

Description:

This routine reads the byte stream in the data blocks from the FITS tape or disk file written in the simple format, and writes the data into an array. The bytes may be reversed for VAX/VMS.

Invocation

CALL FTS1_RDATA ( MEDIUM, MD, SIZE, BPV, REVERS, BLKSIZ, ACTSIZ, : BUFFER, OFFSET, RECORD, RDISP, DARRAY, STATUS )

Arguments

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.
SIZE = INTEGER (Given)
Number of elements in the data array.
BPV = INTEGER (Given)
The number of bytes per data value.
REVERS = LOGICAL (Given)
If true the FITS data bytes are to be reversed within each word (when BPV is 2) or each integer (when BPV is 4) etc. If BPV=1 this flags makes no difference. Normally, only 2 s complement integer data need be reversed. Floating-point data require adjacent bytes to be swapped.
BLKSIZ = INTEGER (Given)
The maximum blocksize and dimension of the tape/disk buffer.
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 .
BUFFER( BLKSIZ ) = BYTE (Given and Returned)
The buffer containing the block of data. This is only read when %OFFSET does not equal %ACTSIZ, i.e. there are some non-header data within it.
OFFSET = INTEGER (Given and Returned)
The number of bytes in the current block already interpreted.
RECORD( 2880 ) = BYTE (Given and Returned)
The buffer to hold the current FITS record.
RDISP = INTEGER (Given and Returned)
The number of bytes in the current record already interpreted. If this displacement is equal to the record length then a new FITS record will be obtained. The displacement will be updated during processing of the group parameters and data, and therefore can have an arbitrary value between 0 and 2880. Do not modify this argument outside this routine once initialised.
DARRAY( SIZE BPV ) = BYTE (Returned)
The data array used to store the data read.
STATUS = INTEGER(Given and Returned)
Global status value.