Use this only if you are making a program which loops through all extensions (see example fhextname.c). In all other cases, you should refer to extensions by IMAGEID or EXTNAME using on of the following two functions:
Returns a HeaderUnit which contains a matching IMAGEID keyword and seeks the file to the start of the data for that extension.
If no matching IMAGEID is found, 0 is returned.
Returns a HeaderUnit which contains a matching EXTNAME keyword and seeks the file to the start of the data for that extension.
If no matching EXTNAME is found, 0 is returned.
If no EXTEND keyword is found, or if it is not set to T(rue) then 0 is returned. Otherwise the value of the NEXTEND keyword is returned. Use this to test if you have a mutli-extension FITS file.
This returns the expected unpadded image size in bytes. It must be called after valid BITPIX and NAXIS* values have been set. Here is the formula used to obtain the image size in bytes:
Where is 1 for BITPIX=8, 2 for BITPIX=16,
4 for BITPIX=+/-32, and 8 for BITPIX=-64.
This returns the following:
This returns the number of 2880-byte blocks fh_write() or fh_rewrite() will need for the header.