Previous: Low-Level FITS Header I/O Subroutines
Up: Subroutine Calling Sequence Definitions
Next: Define Data Scaling Parameters and Undefined Pixel Flags
Previous Page: Low-Level FITS Header I/O Subroutines
Next Page: Define Data Scaling Parameters and Undefined Pixel Flags

High-Level FITS Header I/O Subroutines

These subroutines provide a simple method of reading or writing most of the keyword values that are normally required in a FITS files. These subroutines are provided for convenience only and are not required to be used. If preferred, users may call the lower-level subroutines described in the previous section to individually read or write the required keywords. Note that the PCOUNT, GCOUNT and EXTEND keywords are not required in the primary header and are only written by the ftphpr subroutine if pcount is not equal to zero, gcount is not equal to zero or one, and if extend is TRUE, respectively. Similarly, the optional TUNITnnn and EXTNAME keywords are written by ftphtb or ftphbn only if the input string values are not blank.

It is important to realize that when creating a new FITS file that in addition to writing the required keywords to the header, one must also initialize the internal FITSIO buffers which define the structure of the FITS primary array or extension by calling one of the following subroutines: ftpdef, ftadef, or ftbdef. One common mistake is to forget to call ftpdef when attempting to create a null, or zero-length primary array.

1
Put primary header or IMAGE extension keywords into the CHU. When writing to an IMAGE extension, the SIMPLE and EXTEND parameters are ignored.

FTPHPR(unit,simple,bitpix,naxis,naxes,pcount,gcount,extend, > status)

2
Get primary header or IMAGE extension keywords from the CHU. When reading from an IMAGE extension the SIMPLE and EXTEND parameters are ignored.

FTGHPR(unit,maxdim > simple,bitpix,naxis,naxes,pcount,gcount,extend,
               status)

3
Put the ASCII table header keywords into the CHU

FTPHTB(unit,rowlen,nrows,tfields,ttype,tbcol,tform,tunit,extname, >
               status)

4
Get the ASCII table header keywords from the CHU

FTGHTB(unit,maxdim > rowlen,nrows,tfields,ttype,tbcol,tform,tunit,
               extname,status)

5
Put the binary table header keywords into the CHU

FTPHBN(unit,nrows,tfields,ttype,tform,tunit,extname,varidat > status)

6
Get the binary table header keywords from the CHU

FTGHBN(unit,maxdim, > nrows,tfields,ttype,tform,tunit,extname,varidat,
               status)



Previous: Low-Level FITS Header I/O Subroutines
Up: Subroutine Calling Sequence Definitions
Next: Define Data Scaling Parameters and Undefined Pixel Flags
Previous Page: Low-Level FITS Header I/O Subroutines
Next Page: Define Data Scaling Parameters and Undefined Pixel Flags

asterix@space.starlink
Wed Feb 16 08:18:45 GMT 1994