pyOPALTools issueshttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues2019-01-30T16:25:42+01:00https://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/1Selection of particle positions with detect_peaks not consistent2019-01-30T16:25:42+01:00snuverink_jjochem.snuverink@psi.chSelection of particle positions with detect_peaks not consistentThe turn separation calculation in cyclotron.py selects the x-axis crossings with a call to detect_peaks:
`pksx = detect_peaks(x, mph=0.04, mpd=100)`
This selects (see figure) the cyan points in the PSI Ring model. However, I would exp...The turn separation calculation in cyclotron.py selects the x-axis crossings with a call to detect_peaks:
`pksx = detect_peaks(x, mph=0.04, mpd=100)`
This selects (see figure) the cyan points in the PSI Ring model. However, I would expect the red points (indices: firstPoint + turnNr*stepsPerTurn). I think inherently the detect_peaks function can always go wrong. Therefore, I would like to change it to the stepsPerTurn selection.
![Orig_Position](/uploads/0053b7843f8bc4dbddb6bae69c7b5231/Orig_Position.png)