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

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


AHELP for CIAO 4.9

grpBinFile

Context: group

Synopsis

Group an array using the grouping applied to another dataset.

Syntax

grpBinFile( PyArray_Type axisArray, PyArray_Type fAxisArray,
PyArray_Type fGroupingCol, PyArray_Type fQualCol )
grpBinFile( PyArray_Type axisArray, PyArray_Type fAxisArray,
PyArray_Type fGroupingCol, PyArray_Type fQualCo, PyArray_Type tabStops )

Returns: ( PyArray_Type grouping, PyArray_Type quality )

Description

This function allows you to calculate the grouping information needed to group the input data (the axisArray array) to match the grouping of another dataset (the fAxisArray, fGroupingCol, and fQualCol arrays which can be read from a file). Often you can apply the grouping information directly - i.e. call

grpGetGroupSum( axisArray, fGroupingCol )

rather than grpBinFile() - unless the two datasets do not have the same set of axis values. An example of this is when different binning factors are used to create spectra, e.g. calling dmextract with

[bin pha=1:4096:4]

and

[bin pha=1:4096:1]

To apply the grouping calculated from one of these spectra to the other one requires the use of grpBinFile().

This function provides the same functionality as the BIN_FILE option of dmgroup.

The group module is not available by default; to use it in a Python program, it must be loaded using the Python import function:

  from group import *, or import group

Example 1

>>> ( grp, qual ) = grpBinFile( spec2, spec1, spec1GROUPING,
spec1QUALITY )

The grpBinFile() routine is used to calculate the grouping and quality arrays and apply the grouping from one spectrum to another.

Example 2

To see more examples of optional parameters and keywords in the parameter list, please see ahelp grpadaptive

Bugs

See the bugs page for the group library on the CIAO website for an up-to-date listing of known bugs.

Refer to the CIAO bug pages for an up-to-date listing of known issues.

See Also

group
group, grpadaptive, grpadaptivesnr, grpbin, grpbinfile, grpbinwidth, grpgetchanspergroup, grpgetgroupsum, grpgetgrpnum, grpmaxslope, grpminslope, grpnumbins, grpnumcounts, grpsnr

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.