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

URL: http://cxc.harvard.edu/sherpa/ahelp/set_bkg.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.9 Sherpa v1

set_bkg

Context: data

Synopsis

Set a background PHA dataset

Syntax

set_bkg([id], bkg, [bkg_id=1])

Description

The set_bkg command assigns a background PHA dataset to a source 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")
  • bkg - a PHA dataset, e.g. created by unpack_pha ("ahelp unpack_pha")
  • bkg_id - the id of the background to use, e.g. if more than one background is associated with the data; default is the first background dataset

Example 1

sherpa> pha1 = unpack_pha("pha.fits")
sherpa> set_bkg("src", pha1)

Create a Sherpa dataset called "pha1" from the file pha.fits. It is then assigned as the first background for the dataset "src".

Example 2

sherpa> load_pha("bkg","ae_hxd_pinbkg_20060929.pha")
sherpa> set_bkg("src", get_data("bkg"), bkg_id=2)

The background data "bkg" is set as the second background for dataset "src".

Bugs

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

See Also

confidence
set_conf_opt, set_covar_opt, set_proj_opt
data
get_bkg, set_areascal, set_arf, set_backscal, set_coord, set_counts, set_data, set_exposure, set_grouping, set_quality, set_rmf, set_staterror, set_syserror, subtract, unsubtract
filtering
set_filter
info
list_bkg_ids, show_bkg_model, show_bkg_source
methods
set_iter_method, set_iter_method_opt, set_method, set_method_opt
modeling
delete_bkg_model, get_par, set_bkg_model, set_full_model, set_par, set_pileup_model, set_source, set_xsabund, set_xscosmo, set_xsxsect, set_xsxset
plotting
plot_bkg
statistics
set_prior, set_sampler, set_sampler_opt, set_stat
utilities
set_analysis, set_default_id
visualization
image_setregion

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.