Main Content

matlab.io.fits.movNamHDU

Move to first HDU having specific type and keyword values

Syntax

movNamHDU(fptr,hdutype,EXTNAME,EXTVER)

Description

movNamHDU(fptr,hdutype,EXTNAME,EXTVER) moves to the first HDU which has the specified extension type and EXTNAME and EXTVER keyword values (or HDUNAME and HDUVER keywords).

Specify the hdutype parameter as one of these character vectors or string scalars.

'IMAGE_HDU'
'ASCII_TBL'
'BINARY_TBL'
'ANY_HDU'

If hdutype is 'ANY_HDU', only the EXTNAME and EXTVER values are used to locate the correct extension. If the input value of EXTVER is 0, then the EXTVER keyword is ignored and the first HDU with a matching EXTNAME (or HDUNAME) keyword will be found.

This function corresponds to the fits_movnam_hdu (ffmnhd) function in the CFITSIO library C API.

Examples

import matlab.io.*
fptr = fits.openFile('tst0012.fits');
fits.movNamHDU(fptr,'IMAGE_HDU','quality',1);
fits.closeFile(fptr);