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/add_col.py.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 4.0 add_col Context: py.crates

Synopsis

Add a column to a crate.

Syntax

add_col(crate, cratedata)

Description

  • 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.

Argument Description
crate a Crate object
cratedata CrateData object

Example

>>> 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.

Bugs

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

Hardcopy (PDF): A4 | Letter
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.