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/sherpabeta/load_pha.py.html
AHELP for Sherpa 4.0 Beta load_pha Context: py.sherpa

Synopsis

Load PHA data by id

Syntax

load_pha( [id=1], filename, [use_errors=True] )
load_pha( [id=1], PHACrate, [use_errors=True] )
load_pha( [id=1], PyFITS HDUList, [use_errors=True] )

Description

Load a PHA type I or type II file containing given a filename and path, or an PHACrate object, or a PyFITS HDUList object into a data set by data set ID.

Example

sherpa> load_pha("pha.fits")
sherpa> load_pha(2, "pha.fits", use_errors=True)
sherpa> load_pha("bkg", "bkg.fits", True)
sherpa> load_pha(crate)
sherpa> load_pha(hdulist)

The load_pha function can be called with just a filename and path argument, in which case the default id and use_errors equals false will be used. If header keywords for the associated background, ARF, or RMF are found. They will be read in as well. A PHA type II file will produce a individual data set for each spectrum. The generated identifiers for each spectrum's data set can be shown with 'list_data_ids'. Data set IDs can be integers or strings; in the latter case a string can denote useful information about the data (e.g., whether it is your source or background data set).

Bugs

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

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.