Skip to content
Snippets Groups Projects
Commit f0e214c7 authored by Xavier ELATTAOUI's avatar Xavier ELATTAOUI
Browse files

CTRLRFC-1178: bug in peaks indexes fixed.

parent 86ea3c71
No related branches found
No related tags found
No related merge requests found
pom.xml 100644 → 100755
......@@ -10,7 +10,7 @@
<groupId>fr.soleil.deviceservers</groupId>
<artifactId>PeaksSearch</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0</version>
<packaging>pom</packaging>
<properties>
......
......@@ -156,7 +156,10 @@ class PeaksSearch (PyTango.Device_4Impl):
#----- PROTECTED REGION ID(PeaksSearch.FindPeaks) ENABLED START -----#
arr = np.array(argin)
peaks, properties = find_peaks(arr, prominence=self.prominence, distance=self.distance)
argout = np.array(peaks, dtype='uint32')
peaks_val = argin[peaks]
#sort peaks(ascending sort!)
peaks_idx = np.argsort(peaks_val)
argout = np.array(peaks[peaks_idx], dtype='uint32')
# DEBUG : plot data
#----- PROTECTED REGION END -----# // PeaksSearch.FindPeaks
return argout
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment