Skip to the navigation links
Last modified: December 2009

AHELP for CIAO 4.2


Context: group


Group an array using the grouping applied to another dataset.


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 )


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]


[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:



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.


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

See Also

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

Last modified: December 2009