Contenu principal

matlab.io.fits.readBTblHdr

Read header information from current binary table

Syntax

[nrows,ttype,tform,tunit,extname,pcount] = matlab.io.fits.readBTblHdr(fptr)

Description

[nrows,ttype,tform,tunit,extname,pcount] = matlab.io.fits.readBTblHdr(fptr) returns header information for the current binary table.

Examples

collapse all

Open a sample FITS file that has a binary table in the second HDU. Get header information for the table. Then close the file.

import matlab.io.*
fptr = fits.openFile("tst0012.fits");
fits.movAbsHDU(fptr,2);
[nrows,ttype,tform,tunit,extname,pcount] = fits.readBTblHdr(fptr)
nrows = 
11
ttype = 1×13 cell
    {'IDENT'}    {'FLAGS'}    {'COUNTS'}    {'COOR'}    {'FLUX'}    {'DUMMY'}    {'CHANNEL'}    {'Yes_No'}    {'Index'}    {'Array'}    {'Complex'}    {'Cplx_64'}    {'NOTE'}

tform = 1×13 cell
    {'9A'}    {'13X'}    {'3B'}    {'2D'}    {'3E'}    {'0J'}    {'I'}    {'2L'}    {'3J'}    {'PI(13)'}    {'2C'}    {'M'}    {'B'}

tunit = 1×13 cell
    {0×0 char}    {0×0 char}    {0×0 char}    {'M'}    {'JY'}    {0×0 char}    {0×0 char}    {0×0 char}    {0×0 char}    {0×0 char}    {0×0 char}    {0×0 char}    {0×0 char}

extname = 
'BinTest'
pcount = 
2731
fits.closeFile(fptr)

Tips

  • This function corresponds to the fits_read_btblhdrll (ffghbnll) 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