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

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


AHELP for CIAO 4.5

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

  • crate - input crate
  • vectors - flag to control format for vector columns: True (default) shows vector notation, False displays the individual component columns
  • rawonly - flag for including or excluding virtual columns: True (default) excludes virtual columns, False includes them

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 ("ahelp get_col_names"), 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 ("ahelp get_key_names"), 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 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.