Declaration: TMetaData.Group[Layer: integer]: integer;
The array property Group gives access to the spectral group of the specified Layer. If the parameter Layer specifies an invalid layer a value of -1 is returned (on read) or the assignment is ignored (on write).

The valid range of spectral groups is 0 to 4. Please note that changing the group number is a potentially dangerous action. In general, group numbers other than zero have to be assigned to contiguous ranges of layers only, otherwise the calibration of the wavelength will be corrupted. Spectra belonging to a particular group must not be fragmented across the layers.

Further, after changing the group assignment it might be necessary to adjust the calibration as well.

Hint: In order to directly access the metadata of the currently loaded dataset you can use the pre-declared global variable MData.