flaredetector: make sure to only use valid flares

flattening can sometimes invert tips in the lightcurve to cause
a false detection of a flare
This commit is contained in:
2024-11-14 13:35:12 +01:00
parent d005102a09
commit 09902a70e8
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -210,7 +210,7 @@ class FlaredetectorWidget(QtWidgets.QWidget):
self.currentFlattenLC = lc.flatten(window_length=self.FlattenState["WindowLength"],
polyorder=self.FlattenState["PolynomialOrder"])
self.foldedLC = lc.to_periodogram(method=self.PeriodogramState["Method"])
self.peaks, self.fits = calculateFlareFitsForLightcurve(self.currentFlattenLC, num=100)
self.peaks, self.fits = calculateFlareFitsForLightcurve(self.currentFlattenLC, num=100, normalizedLC=self.currentLC.normalize())
self.periods = [self.foldedLC.period[i] for i in findMaxIndices(self.foldedLC, num=4, distance=100, sortByHighest=True)]
self.epoch_time = getEpochTime(lc)
self.periodsCalculated.emit(self.periods)