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

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


AHELP for CIAO 4.5

col_exists

Context: crates

Synopsis

Determine if a column exists in a crate.

Syntax

col_exists(crate, name)

Description

  • crate - input crate
  • name - the column name to check

The col_exists command returns True if the column exists and False if not. The name comparison is case-insensitive.

The get_col_names() routine ("ahelp get_col_names") can be used to find the columns in a Crate.

Example

>>> cr = read_file("evt2.fits")
>>> col_exists(cr, "ENERGY")
True
>>> col_exists(cr, "energy")
True

Note that the check is case-insensitive on the column name.

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

contrib
add_colvals
crates
add_col, copy_colvals, delete_col, get_col, get_col_names, get_colvals, get_number_cols, is_pha, is_rmf, is_virtual, key_exists, set_colvals

Last modified: December 2012
CXC logo

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