          Determine if the keyword exists in the crate.

key_exists(crate, keyname)

Argument
Description
crate
A Crate object such as a TABLECrate or IMAGECrate
keyname
The key name (case insensitive).

The key_exists command returns True if the keyword exists and False if not. The comparison is case-insensitive.

The get_key_names routine can be used to find the names of all the keywords in a Crate.

>>> cr = read_file("evt2.fits")
>>> key_exists(cr, "DETNAM")
True
>>> key_exists(cr, "detnam")
True

Note that the check is case-insensitive.

See the bug pages on the CIAO website for an up-to-date listing of known bugs.

December 2013