load_pha( [id], filename|PHACrate, [use_errors=False] )
The load_pha command loads a PHA spectrum from a type I or
type II FITS file or a PHACrate and assigns it to a source id.
An individual dataset is established for each spectrum in a
PHA type II file; the generated ids can be listed with the
list_data_ids command
("ahelp list_data_ids").
-
id - the id of the dataset to use; if not given, uses the default dataset id (id=1 by default, see "ahelp get_default_id")
-
filename|PHACrate - the name of the file (with path) or
PHACrate which contains the PHA data
-
use_errors - read the statistical errors from the PHA file?
default=False
If the input PHA file contains grouping information, the data
are automatically grouped. Sherpa also reads any quality
information, allowing the user to filter out bad channels.
If the header keywords of the PHA file contain ARF, RMF, and
background information, the files are automatically read
in and assigned to the source dataset. Background and
response files may also be loaded manually with the
load_bkg
("ahelp load_bkg"),
load_arf
("ahelp load_arf"),
and load_rmf
("ahelp load_rmf")
commands.
sherpa> load_pha("source.pha")
A spectrum is loaded from the file source.pha with data id
1 by default.
sherpa> load_pha("acis_459_pha2.fits")
sherpa> list_data_ids
sherpa> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
An ACIS/HETG type II PHA file is read into Sherpa,
establishing twelve datasets (one for each row in the file).
sherpa> load_pha("src", "3c273.pi", use_errors=True")
Read the spectrum from 3c273.pi and give it the id "src".
The errors are read from the file as well.
sherpa> srcr = read_pha("src.pi")
sherpa> load_pha(srcr)
The PHA file is read into a PHACrate (named "srcr") from
src.pi. The source data is then loaded into Sherpa from
the crate, using the default options.
- py.sherpa
-
add_user_pars,
dataspace1d,
dataspace2d,
fake_pha,
get_default_id,
list_bkg_ids,
list_data_ids,
load_arf,
load_arrays,
load_ascii,
load_bkg,
load_bkg_arf,
load_bkg_rmf,
load_data,
load_image,
load_multi_arfs,
load_multi_rmfs,
load_rmf,
load_table,
load_table_model,
load_user_model,
pack_image,
pack_pha,
pack_table,
save_data,
save_image,
save_pha,
save_table,
unpack_arf,
unpack_arrays,
unpack_ascii,
unpack_bkg,
unpack_data,
unpack_image,
unpack_pha,
unpack_rmf,
unpack_table
|