Get the column values from a crate.
get_colvals(crate, colid);
- 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).
| crate |
a Crate object |
| colid |
column name or number; the number of the first column is 0 |
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
would have also returned the data for this column, assuming that the
time column is the first one in the file.
See the
bug pages
on the CIAO website for an up-to-date listing of known bugs.
- sl.crates
-
add_col,
col_exists,
cratedata,
delete_col,
get_axis_transform,
get_col,
get_col_names,
get_crate_item_type,
get_crate_type,
get_image,
get_image_shape,
get_imagevals,
get_key,
get_key_names,
get_keyval,
get_number_cols,
get_number_rows,
get_transform,
get_transform_matrix,
print_col_names,
set_colvals
|