Cfitsio Toolkit - matlab.io.fits.getNumHDUs


: num = getNumHDUs(file)

Return the count of HDUs in the file.

This is the equivalent of the cfitsio fits_get_num_hdus function.

Inputs

file - opened fits file.

Outputs

num - return the number of HDUs in the file.

Examples

 import_fits;
 testname = file_in_loadpath("demos/tst0012.fits");
 fd = fits.openFile(testname);
 hducount = getNumHDUs(fd), 5);
 fits.closeFile(fd);