Main Content

matlab.io.fits.getHDUtype

当前 HDU 的类型

语法

htype = getHDUtype(fptr)

说明

htype = getHDUtype(fptr) 返回 FITS 文件中当前 HDU 的类型。htype 的可能值包括:

'IMAGE_HDU'
'ASCII_TBL'
'BINARY_TBL'

此函数对应于 CFITSIO 库 C API 中的 fits_get_hdu_type (ffghdt) 函数。

示例

import matlab.io.*
fptr = fits.openFile('tst0012.fits');
n = fits.getNumHDUs(fptr);
for j = 1:n
    fits.getHDUtype(fptr);
end
fits.closeFile(fptr);

另请参阅