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 2006

URL: http://cxc.harvard.edu/ciao3.4/load_pha2.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 load_pha2 Context: sherpa

Synopsis

Module function to load source data from PHA Type II files into Sherpa

Syntax

Integer_Type load_pha2([Integer_Type], {String_Type | Struct_Type})

Success/Error Return Values: 1/0

Arguments:

(1) Data set number (default 1)

(2) PHA Type II filename, or

(2) S-Lang variable output by readpha()

Description

The function load_pha2() loads data from a PHA Type II file into a Sherpa data set. If the file contains the header keywords BACKFILE, RESPFILE, and/or ANCRFILE, the background, RMF, and/or ARF file contents are automatically read in as well. If the file contains the columns BACKGROUND_UP and BACKGROUND_DOWN, their contents are combined into a single background dataset, which is then read in.

Note that there is no equivalent function currently for inputting background data from a PHA Type II file.

See the related Sherpa command READ for more information.

Example 1

sherpa> () = load_pha2(,"example.pha")
sherpa> () = load_pha2(1,"example.pha")

These two commands will load data from the PHA Type II file into Sherpa source data sets, starting with data set 1.

Example 2

sherpa> foo = readpha("example.pha")
sherpa> () = load_pha2(1,foo)

Here the data are read into the S-Lang variable ``foo''. The load_pha2() function then reads the data from arrays which are part of the variable ``foo''.

Bugs

See the Sherpa bug pages online for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



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.