Chandra X-Ray Observatory (CXC)
Skip to the navigation links
Last modified: December 2011

URL: http://cxc.harvard.edu/ciao/read_pha.html
AHELP for CIAO 4.4

read_pha

Context: crates

Synopsis

Load a PHA file into a PHACrateDataset.

Syntax

read_pha(filename)

Description

  • filename - name of the input file

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

Example

>>> cds = read_pha("pha2")
>>> print(cds)

The output of the print command is:

   PHA Crate Dataset:
     File Name:         pha2
     PHA Type:          2
     Read-Write Mode:   rw
     Number of Crates:  3
       1)     Crate Type:        <IMAGECrate>
   Crate Name:        PRIMARY
   Crate Number:      1

       2)     Crate Type:        <TABLECrate>
   Crate Name:        SPECTRUM
   Crate Number:      2
   Ncols:             13
   Nrows:             12

       3)     Crate Type:        <TABLECrate>
   Crate Name:        REGION
   Crate Number:      3
   Ncols:             10
   Nrows:             36

In this example the PHA file is a type II grating dataset and was obtained from TGCat.

Changes in CIAO 4.4

The PHA class returned by read_pha has been updated to take advantage of the CrateDataset support added in CIAO 4.4. The interface is not compatible with that of CIAO 4.3.

Bugs

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

Refer to the CIAO bug pages for an up-to-date listing of known issues.

See Also

contrib
make_image_crate, make_table_crate, scale_image_crate, smooth_image_crate, write_arrays, write_columns
crates
add_col, add_crate, add_key, add_piximg, cratedataset, delete_col, delete_key, delete_piximg, get_crate, is_pha, read_file, read_rmf, write_file, write_pha, write_rmf

Last modified: December 2011
CXC logo

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-2012. All rights reserved.