diff --git a/main/flaredetector/flaredetector.py b/main/flaredetector/flaredetector.py index 856d7c6..9e1bedb 100644 --- a/main/flaredetector/flaredetector.py +++ b/main/flaredetector/flaredetector.py @@ -26,7 +26,7 @@ def calculateFitForFlare(lightcurve, peakIndex): return Peak+1, flareFitDataPoints, fit+1 def calculateFlareFitsForLightcurve(lightcurve, num=100, distance=1, height=0.05): - maxIndices = findMaxIndices(lightcurve, num, distance=distance, height=height) + maxIndices = findMaxIndices(lightcurve, num, distance=distance, height=height, sortByHighest=True) peaks = [] fits = [] for index in maxIndices: