Main Content

matlab.io.fits.readKeyDbl

Read key as double-precision value

Syntax

[value,comment] = matlab.io.fits.readKeyDbl(fptr,keyname)

Description

[value,comment] = matlab.io.fits.readKeyDbl(fptr,keyname) returns the specified key value and comment. Specify the keyname argument as a string scalar or character vector. The function returns value as a double scalar value and comment as a character vector.

Examples

collapse all

Read the key value and comment for the keyword CRPIX2 in a sample FITS file.

import matlab.io.*
fptr = fits.openFile("tst0012.fits");
[value,comment] = fits.readKeyDbl(fptr,"CRPIX2")
value = 
-2.0318e+03
comment = 
'Reference pixel in Y'
fits.closeFile(fptr)

Tips

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