WLToIndex

Declaration: TSpecCollection.WLToIndex(wl: double; grp: integer; var resid: double): integer;
Converts the wavelength wl to the corresponding index (1-based!). The grp parameter specifies the spectral group number. The variable parameter resid returns the fractional part of the calculated index and may be used to round it (the calculated index is always truncated and not rounded).

Hint: In order to access the spectral collection currently loaded in the Spectral Collection Editor you can use the pre-declared global variable SCData.