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

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


AHELP for CIAO 4.9 Sherpa v1

set_counts

Context: data

Synopsis

Set the dependent variable (e.g. counts) of a dataset

Syntax

set_dep([id], val, [bkg_id])
set_counts([id]; val, [bkg_id])

Description

The set_dep command sets the dependent variable (e.g. counts) of a dataset. The command may also be called as set_counts. The value may be an array or a single value to be repeated for every bin.

  • 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")
  • val - array or scalar values
  • bkg_id - the id of the background, if setting the background value; default=None

Example 1

sherpa> set_counts(1,1)

Set the counts in dataset id=1 to a value of 1.

Example 2

sherpa> set_dep("src",[1,2,3,...])

Set the dependent variable in dataset "src" with the values in the array.

Example 3

sherpa> set_dep([1,2,3,...], bkg_id=1)

Use an array to set the values in the first background associated with the default dataset.

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
set_areascal, set_arf, set_backscal, set_bkg, set_coord, set_data, set_exposure, set_grouping, set_quality, set_rmf, set_staterror, set_syserror
filtering
set_filter
methods
set_iter_method, set_iter_method_opt, set_method, set_method_opt
modeling
get_par, set_bkg_model, set_full_model, set_par, set_pileup_model, set_source, set_xsabund, set_xscosmo, set_xsxsect, set_xsxset
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.