Detects spikes in all pixels of the hyperspectral image; for a short discussion of the detection algorithm see the section on the Spike Removal Tool. The spectral range can be restricted by setting the parameters FirstLayer and LastLayer. Please note that in the case of data cubes containing more than one spectral group, you have to set these parameters such that they are specifying layers which belong to the same spectral group (use the function ObtainSpecRange to retrieve the range of a spectral group). The parameter TimeSlot controls the time slot to be processed.
The parameter HalfWidth specifies the expected width of a spike. This parameter is quite sensitive for the quality of spike recognition, normally it should be set to 1 (unless the spikes are broader than one data point).
There are two baseline approximation methods available, which are selected by setting the parameter UseLinFit. If UseLinFit is TRUE a linear fit is used, otherwise a parabolic fit is applied to model the baseline. The parameter RecogLevel defines the sensitivity of spike recognition (i.e. the required minimum ratio of the deviation of data point from the baseline to the baseline noise).
The function returns the information on the detected spikes in two arrays: (1) The threedimensional array SpikeMat contains the spike scores (= the ratio of the deviation of data point from the baseline to the baseline noise) of a maximum of three spikes for each pixel. If a spectrum contains less than three spikes the unused cells in SpikeMat are zero, if a spectrum contains more than three spikes, the forth and all other spikes are listed in SpikeList, but the scores are not stored in SpikeMat. (2) The onedimensional integer array SpikeList contains the addresses of the spikes in encoded form: the value in each cell of the array is calculated according to the following equation:
value = ((ix1)+(iy1)*SizeX)*SizeL+il1,
with ix, iy, and il being the x, y, and layer index of the data cube, SizeX the number of pixels along the xaxis and SizeL the number of layers of the data cube.
If FeedBack is TRUE the progress of the routine is displayed using the ImageLab progress bar.
The function returns the following error codes:
0 ... everything is OK
1 ... the HalfWidth is out of range (valid range: 1..100)
2 ... the LastLayer is less than or equal to the FirstLayer
3 ... the FirstLayer or the LastLayer are out of range
4 ... invalid TimeSlot
5 ... the recognition level in out of range (valid range: >= 2.0)
