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

URL: http://cxc.harvard.edu/ciao/ahelp/print_crate_names.html
Jump to: Description · Examples · Bugs


AHELP for CIAO 4.9

print_crate_names

Context: crates

Synopsis

Display information on data from a crate.

Syntax

print_axis_names(crate)
print_col_names(crate, vectors=True, rawonly=True)
print_key_names(crate)

Description

Argument Description
crate A Crate object such as a TABLECrate or IMAGECrate
vectors Should vector notation be used (True) or should individual component columns be included (False)?
rawonly Should virtual columns be excluded (True) or included (False)?

These routines return a string which describes the contents of the Crate. They are intended for exploratory analysis and simple debugging; other routines exist to access this information in a more programmatic manner.

print_axis_names

The print_axis_names command prints the names of the axes in the given IMAGECrate.

print_col_names

The print_col_names command prints the names of the columns in the given table crate. To retrieve the columns as an array, use the get_col_names command, which should be used instead of print_col_names() if possible.

print_key_names

The print_key_names command prints the names of the keywords in the given crate. To retrieve the keywords as an array, use the get_key_names command, which should be used instead of print_key_names() if possible.

Example 1

chips> cr = read_file("image.fits")
chips> print(print_axis_names(cr))
 Index  Axisname
   0)   sky
   1)   EQPOS

Example 2

chips> cr = read_file("evt2.fits")
chips> print(print_col_names(cr))

The output of the above is:

        Colname
   0)   sky(X, Y)
   1)   EQPOS(RA, Dec)
   2)   SHAPE
   3)   R
   4)   ROTANG
   5)   COMPONENT
   6)   COUNTS
   7)   ERR_COUNTS
   8)   AREA
   9)   EXPOSURE
  10)   COUNT_RATE
  11)   COUNT_RATE_ERR
  12)   NET_COUNTS
  13)   NET_ERR
  14)   NET_RATE
  15)   ERR_RATE
  16)   SUR_BRI
  17)   SUR_BRI_ERR

As the default settings are used, the output includes regular column names and vector column names in vector notation, but not virtual column names.

Example 3

chips> print(print_col_names(cr, vectors=False))

The output changes to:

        Colname
   0)   X
   1)   Y
   2)   RA
   3)   Dec
   4)   SHAPE
   5)   R
   6)   ROTANG
   7)   COMPONENT
   8)   COUNTS
   9)   ERR_COUNTS
  10)   AREA
  11)   EXPOSURE
  12)   COUNT_RATE
  13)   COUNT_RATE_ERR
  14)   NET_COUNTS
  15)   NET_ERR
  16)   NET_RATE
  17)   ERR_RATE
  18)   SUR_BRI
  19)   SUR_BRI_ERR

Example 4

chips> print(print_col_names(cr, vectors=False, rawonly=False))
        Colname
   0)   X
   1)   Y
   2)   RA
   3)   Dec
   4)   SHAPE
   5)   R
   6)   ROTANG
   7)   COMPONENT
   8)   COUNTS
   9)   ERR_COUNTS
  10)   AREA
  11)   EXPOSURE
  12)   COUNT_RATE
  13)   COUNT_RATE_ERR
  14)   NET_COUNTS
  15)   NET_ERR
  16)   NET_RATE
  17)   ERR_RATE
  18)   SUR_BRI
  19)   SUR_BRI_ERR
  20)   CEL_R
  21)   CEL_AREA
  22)   CEL_BRI
  23)   CEL_BRI_ERR

Example 5

chips> print(print_key_names(cr))
 Index  Keyname
   0)   ASOLFILE
   1)   THRFILE
   2)   ORIGIN
   3)   CREATOR
   4)   ASCDSVER
   5)   MJD_OBS
   6)   DS_IDENT
...

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.


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.