Skip to the navigation links
Last modified: December 2009

URL: http://cxc-newtest.cfa.harvard.edu/ciao4.2/grpbinfile.html
AHELP for CIAO 4.2

grpBinFile

Context: group

Synopsis

Group an array using the grouping applied to another dataset.

Syntax

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

Returns: ( Array_Type grouping, Array_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). The optional parameter tabStops is an array of those elements that should be ignored. The tabStops array must be the same length as the channels array. A value of 0 means no tab; a value of 1 means that there is a tab stop.

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 S-Lang program, it must be loaded using the S-Lang require() function:

  require("group");

Example

slsh> ( grp, qual ) = grpBinFile( spec2.PI, spec1.PI, spec1.GROUPING,
spec1.QUALITY );

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

Bugs

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

See Also

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

Last modified: December 2009