NormalizeToExtData

Declaration: NormalizeToExtData(ExtDataFName: string; Offset: double; Feedback: boolean): integer;
Normalizes the data currently in memory by dividing it by another data cube which is stored in the file ExtDataFName. The external data may be offset by the value of the parameter Offset before using it as the denominator of the normalisation:

Data[x,y,l,t] := Data[x,y,l,t]/(ExtData[x,y,l,t]+Offset)

This procedure does not use any extra memory for the external file.

The parameter Feedback controls whether Epina ImageLab provides a visual feedback of the progress. Please note that unless the script progress bar is already visible you have to make it visible before calling NormalizeToExtData, 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 OK, the data cube is normalized
-1 ... the external data set does not match the currently loaded data
-2 ... the file specified by ExtDataFName does not exist