flaredetector: add boundaries for flare range
This commit is contained in:
@@ -30,6 +30,12 @@ def getFlareRange(flux, peakIndex):
|
||||
break
|
||||
prevFlux = flux[i]
|
||||
|
||||
if(minInd == -np.inf):
|
||||
minInd = peakIndex - maxBacklog
|
||||
|
||||
if(minInd < 0):
|
||||
minInd = 0
|
||||
|
||||
deltaCount = 0
|
||||
delta = 100
|
||||
prevFlux = flux[peakIndex]
|
||||
@@ -42,4 +48,10 @@ def getFlareRange(flux, peakIndex):
|
||||
break
|
||||
prevFlux = flux[i]
|
||||
|
||||
if(maxInd == np.inf):
|
||||
maxInd = peakIndex + maxForwardlog
|
||||
|
||||
if(maxInd > len(flux)-1):
|
||||
maxInd = len(flux)-1
|
||||
|
||||
return minInd, maxInd
|
||||
|
||||
Reference in New Issue
Block a user