Previous: FITS File Open and Close Subroutines:
Up: Subroutine Calling Sequence Definitions
Next: Subroutines to specify the structure of a new HDU
Previous Page: FITS File Open and Close Subroutines:
Next Page: Subroutines to specify the structure of a new HDU
When a FITS file is first opened or created, the internal buffers in
FITSIO automatically point to the first HDU in the file. The following
routines may be used to move to another HDU in the file. Note that
the HDU numbering convention used in FITSIO denotes the primary array
as the first HDU, the first extension in a FITS file is the second HDU,
and so on.
- 1
- Move to a specified (absolute) HDU in the FITS file (nhdu = 1 for the
FITS primary array)
FTMAHD(unit,nhdu, > hdutype,status)
- 2
- Move to a new (existing) HDU forward or backwards relative to the CHDU
FTMRHD(unit,nmove, > hdutype,status)
- 3
- Get the number of the current HDU in the FITS file (primary array = 1)
FTGHDN(unit, > nhdu)
- 4
- Create (append) a new empty HDU at the end of the FITS file
FTCRHD(unit, > status)
- 5
- Copy the entire CHDU from the FITS file associated with IUNIT to the CHDU
of the FITS file associated with OUNIT. This will overwrite any data
previously in the OUNIT CHDU. Space will be reserved for MOREKEYS
additional keywords in the output header if there is not already enough
space.
FTCOPY(iunit,ounit,morekeys, > status)
- 6
- Copy just the data from the CHDU associated with IUNIT
to the CHDU associated with OUNIT. This will overwrite
any data previously in the OUNIT CHDU. This low level routine is used
by FTCOPY, but it may also be useful in certain application programs
which want to copy the data from one FITS file to another but also
want to modify the header keywords in the process. all the required
header keywords must be written to the OUNIT CHDU before calling
this routine
FTCPDT(iunit,ounit, > status)