Determine if a column exists in a crate.
- crate - input crate
- name - the column name to check
The col_exists command returns "1" if the column exists and
"0" if not. The name comparison is case-insensitive.
The crate must be a 'Table', 'ARF', 'PHA', or 'RMF'
crate.
The print_col_names command
("ahelp print_col_names")
lists all the columns in the file.
slsh> cr = read_file("evt2.fits");
slsh> col_exists(cr, "ENERGY");
1
slsh> col_exists(cr, "energy");
1
The keyword ENERGY exists in the file evt2.fits. Since the
check is case-insensitive, the command returns 1 for both
"ENERGY" and "energy".
slsh> cr = read_file("evt2.fits");
slsh> col_exists(cr, "count_rate");
0
There is not a column named count_rate in the file evt2.fits.
See the
bug pages
on the CIAO website for an up-to-date listing of known bugs.
- sl.crates
-
add_col,
copy_colvals,
delete_col,
get_col,
get_col_names,
get_colvals,
get_number_cols,
is_arf,
is_pha,
is_rmf,
is_virtual,
key_exists,
print_col_names,
set_colvals
|