function getfitskey

Returns the value of specified FITS key in the header of X. The returned type can be either a string, an integer number or a real number. If the specified key does not exist, an empty string is returned.

result = getfitskey(X, KEY [, extension] [, /text])

X:   A matrix or a FITS file.
KEY:   A string.
extension:   Integer number specifying which extension to read.

text:   Return the fits key as a string.