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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user