specgroup is a tool which allows a flexible, user-defined grouping of channels in a spectrum. It extends the functionality of the ftool GRPPHA to allow the user more options of grouping the spectrum based on statistical criteria.
Channels can be predefined as BAD (i.e. not to be used) either by using definitions from a calibration file or by specifying the channels or energy range to exclude on the command line.
The treatment of the special cases of the first and last group is user definable (section 4.4).