Contenido principal

matlab.io.fits.getHDUnum

Get number of current HDU in FITS file

Syntax

N = matlab.io.fits.getHDUnum(fptr)

Description

N = matlab.io.fits.getHDUnum(fptr) returns the number of the current HDU in the FITS file. The primary array has HDU number 1.

Examples

collapse all

import matlab.io.*
fptr = fits.openFile("tst0012.fits");
N = fits.getHDUnum(fptr)
N = 
1
fits.closeFile(fptr)

Tips

  • This function corresponds to the fits_get_hdu_num (ffghdn) function in the CFITSIO library C API.

  • To use this function, you must be familiar with the CFITSIO C interface. You can access the CFITSIO documentation at the CFITSIO website.

Extended Capabilities

expand all

Version History

expand all