Skip to the navigation links
Last modified: December 2009

URL: http://cxc-newtest.cfa.harvard.edu/ciao4.2/get_key_names.py.html
AHELP for CIAO 4.2

get_key_names

Context: py.crates

Synopsis

Return an array of the keywords in a crate.

Syntax

get_key_names(crate)

Description

  • crate - input crate

The get_key_names command retrieves the keywords in the crate as an array of strings.

To print the names of the keywords, use the print_key_names command ("ahelp print_key_names") .

Example

>>> cr = read_file("evt2.fits")
>>> knames = get_key_names(cr)
>>> print(knames[10:15])
['DATE-OBS' 'DATE-END' 'TIMESYS' 'MJDREF' 'TIMEZERO']

Retrieve the keywords from the crate "cr", then print out five elements of the array.

Bugs

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

See Also

py.crates
add_key, delete_key, get_axis_transform, get_col, get_col_names, get_colvals, get_crate_item_type, get_crate_type, get_key, get_keyval, get_number_cols, get_number_rows, get_piximg, get_piximg_shape, get_piximgvals, get_transform, get_transform_matrix, key_exists, print_key_names, set_keyval

Last modified: December 2009