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).
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
and
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.
chips> pha1 = readbintab( "spec1.pi" )
chips> pha2 = readbintab( "spec2.pi" )
chips> ( grp, qual ) = grpBinFile( pha2.PI, pha1.PI, pha1.GROUPING,
pha1.QUALITY )
In this example we read in the data from two spectra
which were binned on the PI channel.
The grpBinFile() routine is used to calculate the
grouping and quality arrays for spec2.pi that
match the grouping applied to spec1.pi.
Note that readbintab() was used to read in both
files; readpha() should not be used since this automatically
applies the grouping information when reading in the
data, and the resulting data can not be used in
grpBinFile() since information has been lost.
- group
-
grpadaptive,
grpadaptivesnr,
grpbin,
grpbinfile,
grpbinwidth,
grpgetchanspergroup,
grpgetgroupsum,
grpgetgrpnum,
grpmaxslope,
grpminslope,
grpnumbins,
grpnumcounts,
grpsnr
- modules
-
group
|