Load a PHA background spectrum
load_bkg( [id], filename|PHACrate; [use_errors=0], [bkg_id=NULL] );
The load_bkg command loads a PHA background spectrum from a FITS
file or a PHACrate and assigns it to a source id. The
background dataset if its source id is reassigned to a new
dataset.
-
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=0
-
bkg_id - the id of the background, if the response is a
background response;
default=NULL
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 and RMF
information, the files are automatically read in and assigned
as the background responses. Background response files may
also be loaded manually with the load_bkg_arf
("ahelp load_bkg_arf")
and load_bkg_rmf
("ahelp load_bkg_rmf")
commands.
sherpa> load_bkg("back.pha");
A background spectrum is loaded from the file back.pha and
assigned to the default dataset.
sherpa> load_bkg("src", "3c273_bkg.pi"; use_errors=1, bkg_id="bkg");
Read the background spectrum from 3c273_bkg.pi, give it
the id "bkg", and assign it to the dataset "src". The
errors are read from the file as well.
sherpa> backcr = read_pha("back.pi");
sherpa> load_bkg(backcr);
The background PHA file is read into a PHACrate (named
"backcr") from back.pi. The background is then loaded
into Sherpa from the crate, using the default options.
- sl.sherpa
-
add_user_pars,
dataspace1d,
dataspace2d,
get_default_id,
list_bkg_ids,
list_data_ids,
load_arf,
load_arrays,
load_ascii,
load_bkg_arf,
load_bkg_rmf,
load_data,
load_image,
load_multi_arfs,
load_multi_rmfs,
load_pha,
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
|