UpsampleSpectra

Declaration: UpsampleSpectra (Mode: TUsMode; UsFact, SpecGroup: integer; FeedBack: boolean): integer;
Upsamples the spectra of all pixels (of all time slots) belonging to the spectral group SpecGroup. The parameter UsFact specifies the upsampling factor (valid range 2...4). The parameter Mode determines the type of interpolation used for the estimation of the inserted data points and can assume the following values:
usNone ... no interpolation, the inserted data points are zero
usSampleHold ... replication of the data values (results in a step function)
usLinInterpol ... linear interpolation

Setting the Feedback parameter to TRUE activates the script progress bar to provide visual feedback of the process. Please note that unless the script progress bar is already visible you have to make it visible before calling UpsampleSpectra, otherwise the feedback will not be displayed. You can activate the script progress bar by calling the function ScriptBar(0).

The function returns the following error codes:

 0 ... everything is OK
-1 ... USFact is out of range
-2 ... invalid SpecGroup