About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2007

URL: http://cxc.harvard.edu/ciao4.0/get_colvals.sl.html
AHELP for CIAO 4.0 get_colvals Context: sl.crates

Synopsis

Get the column values from a crate.

Syntax

get_colvals(crate, colid);

Description

  • crate - input Crate object
  • colid - column name or number, where the first column is numbered 0

Extracts and returns an array of values of specified column within the input Crate. Crate must be of type 'Table', 'ARF', 'PHA', or 'RMF'. Use the get_col() routine to return a CrateData object for the column (which is useful if you are interested in the metadata associated with the column).

Argument Description
crate a Crate object
colid column name or number; the number of the first column is 0

Example

slsh> crate = read_file("table.fits");
slsh> vals = get_colvals(crate, "time");
slsh> print (vals[[0:2]]);
6.80091e+07
6.80094e+07
6.80096e+07
slsh>

Get the values of the "time" column from the crate and then print out the first three values. The command

get_colvals(crate,0);

would have also returned the data for this column, assuming that the time column is the first one in the file.

Bugs

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

Last modified: December 2007



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-2004. All rights reserved.