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

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


AHELP for CIAO 4.6 Sherpa v2

set_grouping

Context: data

Synopsis

Apply user-defined grouping to a dataset

Syntax

set_grouping( [id,] val [,bkg_id=None] )

Description

The set_grouping command applies a user-defined grouping scheme to the dataset, overriding any grouping contained within the PHA file.

  • 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 - an array defining the grouping or quality. Must be the same length as the input data set. An element set to 1 marks the beginning of a group and an element set to -1 marks subsequent members of that group.
  • bkg_id - the id of the background, if the grouping is to be applied to the background data; default=None

Example 1

sherpa> set_grouping([1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1,
-1, -1, -1, -1, ...] )

A grouping array is applied to dataset 1.

Example 2

sherpa> grpsrc=get_data().grouping
sherpa> set_grouping("src", grpsrc)
sherpa> set_grouping("src", grpsrc, 1)

Retrieve the grouping object of dataset 1 as "grpsrc". Apply this grouping to the source and background of the "src" 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
get_grouping, group, load_grouping, set_areascal, set_arf, set_backscal, set_bkg, set_coord, set_counts, set_data, set_exposure, set_quality, set_rmf, set_staterror, set_syserror, ungroup
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
saving
save_grouping
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:   cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2014. All rights reserved.