{ } Raw JSON

bundles / astropy 7.0.1 / astropy / io / fits / convenience / getval

function

astropy.io.fits.convenience:getval

source: /astropy/io/fits/convenience.py :267

Signature

def   getval ( filename keyword * args ** kwargs )

Summary

Get a keyword's value from a header in a FITS file.

Parameters

filename : path-like or file-like

Name of the FITS file, or file object (if opened, mode must be one of the following rb, rb+, or ab+).

keyword : str

Keyword name

ext, extname, extver

The rest of the arguments are for HDU specification. See getdata for explanations/examples.

**kwargs

Any additional keyword arguments to be passed to astropy.io.fits.open. Note: This function automatically specifies do_not_scale_image_data = True when opening the file so that values can be retrieved from the unmodified header.

Returns

keyword value : str, int, or float

Aliases

  • astropy.io.fits.getval