matlab.io.fits.getImgType
Get data type of FITS image
Syntax
datatype = getImgType(fptr)
Description
datatype = getImgType(fptr)
gets the data
type of an image. datatype
can be one of the following:
'BYTE_IMG' |
'SHORT_IMG' |
'LONG_IMG' |
'LONGLONG_IMG' |
'FLOAT_IMG' |
'DOUBLE_IMG' |
This function corresponds to the fits_get_img_type
(ffgidt)
function in the CFITSIO library C API.
Examples
fptr = fits.openFile('tst0012.fits'); hdus = [1 3 4]; for j = hdus; htype = fits.movAbsHDU(fptr,j); dtype = fits.getImgType(fptr); fprintf('HDU %d: "%s", "%s"\n', j, htype, dtype); end fits.closeFile(fptr);