add_col(crate, cratedata)
- crate - input Crate object
- cratedata - CrateData object to be added
Adds the column, represented by the cratedata argument, to the crate.
If the item already
exists within the crate, it will be replaced.
| crate |
a Crate object |
| cratedata |
CrateData object |
>>> crate = TABLECrate("table.fits")
>>> print get_col_names(crate)
['CHANNEL' 'E_MIN' 'E_MAX']
>>> col = CrateData()
>>> col.name = "NEWCOL"
>>> add_col(crate, col)
1
>>> print get_col_names(crate)
['CHANNEL' 'E_MIN' 'E_MAX' 'NEWCOL']
>>>
Create a new column called "NEWCOL" and add it to the input Crate.
See the
bug pages
on the CIAO website for an up-to-date listing of known bugs.
- py.crates
-
add_image,
add_key,
col_exists,
delete_col,
delete_image,
delete_key,
get_col,
get_col_names,
get_colvals,
get_number_cols,
print_col_names,
read_arf,
read_file,
read_pha,
read_rmf,
set_colvals,
write_arf,
write_file,
write_pha,
write_rmf
|