das-developers / das2java

The original das2 library. Provides interactive publication-ready 2-D plotting
https://das2.org
GNU Lesser General Public License v3.0
4 stars 0 forks source link

Autohistogram/guessCadence fails with data containing two cadence peaks #110

Closed jbfaden closed 3 months ago

jbfaden commented 3 months ago

Sadie has a dataset where the code fails to guessCadence, because two peaks overlap and neither peak is used.

The code looks for five-point peaks in the histogram, where the center must be greater than the four points surrounding it. This can fail when the two peaks are close to one another.

The code now detects this case, and looks for a simple peak where the peak is surrounded by two lower points.