Function: ftsd_puth Purpose: Writes a FITS header on FITS tape. Category: FITS File: fts_io.c Author: Peter Roelfsema Use: INTEGER FTSD_PUTH( MTID, Input INTEGER, HEADER, Input CHARACTER*(*), BLOCKSIZE ) Input INTEGER. FTSD_PUTH returns: > 0 : number of characters written to tape (i.e. the complete FITS header, including the END record). <= -10: tape error (see MTIODEV.DC2): -11: not a FITS file, -14: SIMPLE not found, -15: SIMPLE = FALSE not supported, -16: BITPIX not found, -17: only BITPIX 8, 16 and 32 are supported, -18: NAXIS not found, -19: not enough NAXIS descriptors found, -20: I could not get enough memory for internal buffer, -23: storage size of character type is not 1 byte, -24: storage size of short type is not 2 bytes, -25: storage size of long type is not 4 bytes, -26: wrong blocksize. MTID A device unit number obtained from MTOPEN, HEADER A string in which the header is located, BLOCKSIZE The desired size for the FITS blocks on tape. Must be a multiple of 2880 (FITS definition). Description: FTSD_PUTH is used as an initialization routine for writing data in FITS format to a tape. It looks up some FITS descriptors necessary for encoding the data and validates them (see routines initio and Get_MinMax). The header and the data will be written to tape in blocks of size blocksize. Before writing to FTSD_PUTH will decode a number of FITS descriptors necessary for encoding the data: the descriptor SIMPLE should be set to True (False is not supported), the BITPIX setting should be in range of the current machine and the obligatory descriptors BLANK, NAXIS and NAXIS% should be defined in the header. If any of these descriptors is missing or has an unknown setting, an error results. FTSD_PUTH assumes that the input device is positioned at the beginning of a file, i.e. immediately past an end of file mark. The routine will overwrite whatever is on tape. Updates: Aug 15, 1990: SS, document created.