Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: December 2013

URL: http://cxc.harvard.edu/ciao/ahelp/key_exists.html
Jump to: Description · Example · Bugs · See Also


AHELP for CIAO 4.9

key_exists

Context: crates

Synopsis

Determine if the keyword exists in the crate.

Syntax

key_exists(crate, keyname)

Description

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.

Example

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

Note that the check is case-insensitive.

Bugs

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

Refer to the CIAO bug pages for an up-to-date listing of known issues.

See Also

crates
add_key, col_exists, cratekey, delete_key, get_key, get_key_names, get_keyval, is_pha, is_rmf, is_virtual, set_key, set_keyval

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.