Documentation

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

matlab.io.fits.getNumHDUs

Total number of HDUs in FITS file

Syntax

N = getNumHDUs(fptr)

Description

N = getNumHDUs(fptr) returns the number of completely defined HDUs in a FITS file. If a new HDU has just been added to the FITS file, then that last HDU will only be counted if it has been closed, or if data has been written to the HDU. The current HDU remains unchanged by this routine.

This function corresponds to the fits_get_num_hdus (ffthdu) function in the CFITSIO library C API.

Examples

import matlab.io.*
fptr = fits.openFile('tst0012.fits');
n = fits.getNumHDUs(fptr);
fits.closeFile(fptr);

See Also

Was this topic helpful?