flaredetector: properly reset deltaCount

This commit is contained in:
2024-04-19 13:59:27 +02:00
parent f19dba985c
commit 7167a482e2
+4
View File
@@ -62,6 +62,8 @@ def getFlareRange(flux, peakIndex):
if(deltaCount > 3):
minInd = i
break
else:
deltaCount = 0
prevFlux = flux[i]
if(minInd == -np.inf):
@@ -83,6 +85,8 @@ def getFlareRange(flux, peakIndex):
if(deltaCount > 3):
maxInd = i
break
else:
deltaCount = 0
prevFlux = flux[i]
if(maxInd == np.inf):