Skip to the navigation links
Last modified: December 2009

URL: http://cxc-newtest.cfa.harvard.edu/ciao4.2/get_number_cols.sl.html
AHELP for CIAO 4.2

get_number_cols

Context: sl.crates

Synopsis

Return the number of columns in a crate.

Syntax

get_number_cols(crate);

Description

  • crate - input crate

The get_number_cols command returns the number of columns in the input crate. If the crate contains an image, the return value is "1".

Example 1

slsh> cr = READ_FILE("evt2.fits");
slsh> get_number_cols(cr);
17

There are 17 columns in the TABLECrate created from the file evt2.fits.

Example 2

slsh> cr = READ_FILE("evt2.fits");
slsh> ncols = get_number_cols(cr);
slsh> print(ncols);
17

The number of rows in the file is stored in the variable "ncols".

Bugs

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

See Also

sl.crates
add_col, col_exists, copy_colvals, delete_col, get_axis_transform, get_col, get_col_names, get_colvals, get_crate_item_type, get_crate_type, get_key, get_key_names, get_keyval, get_number_rows, get_piximg, get_piximg_shape, get_piximgvals, get_transform, get_transform_matrix, is_virtual, print_col_names, set_colvals

Last modified: December 2009