Skip to the navigation links
Last modified: December 2009

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

read_pha

Context: py.crates

Synopsis

Load a PHA file into a PHACrate.

Syntax

read_pha(filename)

Description

  • filename - name of the input file

The read_pha command loads the specified PHA file into a PHACrate.

Users familiar with the CIAO Data Model should note that:

  • Crates reads one extension of the input file, not the whole dataset. The file that is written out will only contain the block which was read.
  • Crates doesn't retain the data subspace of the file.

Example

>>> cr = read_pha("pha.fits")
>>> print(get_crate_type(cr))
PHA

A file is read into the crate "cr" with read_pha, then the get_crate_type command is used to confirm it is a PHACrate.

Bugs

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

See Also

py.crates
add_col, add_key, add_piximg, delete_col, delete_key, delete_piximg, is_pha, read_arf, read_file, read_rmf, write_arf, write_file, write_pha, write_rmf
py.crates_contrib
make_table_crate, scale_image_crate, write_columns

Last modified: December 2009