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

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


AHELP for CIAO 4.6 Sherpa v2

list_bkg_ids

Context: info

Synopsis

List all background IDs associated with a data set.

Syntax

list_bkg_ids( [id] )

Description

A spectral data set can have background data sets assigned to it automatically with load_pha, or manually by the user with load_bkg. (The background can either be subtracted from the data, or simultaneously fit with the data.) The list_bkg_ids function returns a list of all background data sets associated with a data set, by data set ID.

  • id - the id of the data set to use; if not given, uses the default sherpa id (id=1 by default, see "ahelp get_default_id")

Example 1

sherpa> list_bkg_ids()

The list_bkg_ids function lists all background data sets associated with a source data set. If no argument is given, then the default data set ID is assumed, and the backgrounds (if any) associated with that data set are listed, by their IDs.

           sherpa> load_pha(1, "acis_2019_pha.fits")
	         read ARF file acis_2019_arf.fits
	         read RMF file acis_2019_rmf.fits
	         read background file acis_2019_pha.fits
	    
           sherpa> load_bkg(id=1, "acis_2019_bkg2.fits", bkgid=2)
	   
           sherpa> list_bkg_ids()
	         [1, 2]
          

Example 2

sherpa> list_bkg_ids(2)

In this example, the background IDs associated with data set 2 are listed.

           sherpa> load_pha(2, "acis_309_pha.fits")
	         read ARF file acis_309_arf.fits
	         read RMF file acis_309_rmf.fits
	         read background file acis_309_pha.fits

           sherpa> load_bkg(id=2, "acis_309_bkg2.fits", bkgid="bkg2")

           sherpa> list_bkg_ids()
	         [1, 'bkg2']
          

Bugs

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

See Also

data
dataspace1d, dataspace2d, fake, get_bkg, load_arf, load_arrays, load_ascii, load_bkg, load_bkg_arf, load_bkg_rmf, load_data, load_grouping, load_image, load_multi_arfs, load_multi_rmfs, load_pha, load_quality, load_rmf, load_staterror, load_syserror, load_table, pack_image, pack_pha, pack_table, set_bkg, subtract, unpack_arf, unpack_arrays, unpack_ascii, unpack_bkg, unpack_data, unpack_image, unpack_pha, unpack_rmf, unpack_table, unsubtract
filtering
load_filter, show_filter
info
get_default_id, list_data_ids, list_functions, show_all, show_bkg_model, show_bkg_source, show_conf, show_covar, show_data, show_fit, show_method, show_model, show_proj, show_source, show_stat
modeling
add_model, add_user_pars, delete_bkg_model, load_table_model, load_template_model, load_user_model, save_model, save_source
plotting
plot_bkg
saving
save_arrays, save_data, save_delchi, save_error, save_filter, save_grouping, save_image, save_pha, save_quality, save_resid, save_staterror, save_syserror, save_table
statistics
load_user_stat

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:   cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2014. All rights reserved.