astrodatagui: FlaredetectorWidget: show vlines are border for folded lc fit

This commit is contained in:
2024-07-02 12:03:15 +02:00
parent 1b33052c34
commit d614f5ed74
+3 -4
View File
@@ -7,10 +7,7 @@ from matplotlib.backends.backend_qtagg import (
from astropy.visualization import time_support
import lightkurve as lk
from ...flaredetector.util import (findMaxIndices, plotFlarePeaks,
plotFlareFits, markFlare,
convertStarndardIndexToFoldedIndex,
getFoldedBestFit)
from ...flaredetector.util import *
from ...flaredetector.flaredetector import calculateFlareFitsForLightcurve
class FlaredetectorWidget(QtWidgets.QWidget):
@@ -256,6 +253,8 @@ class FlaredetectorWidget(QtWidgets.QWidget):
lc.flux[lc.cycle == cycle][foldedIndex], "x", color="red")
phase, sineFit = getFoldedBestFit(lc)
self.figureAxis.plot(phase, sineFit, color="red")
minPhaseBoundsIndices, maxPhaseBoundsIndices = getPhaseRangesNearPeak(getFoldedFitPeakValley(sineFit), phase)
plotPhaseRangesNearPeak((minPhaseBoundsIndices, maxPhaseBoundsIndices), phase, ax=self.figureAxis)
elif(self.PeriodogramState["Enabled"]):
lc.plot(label=label, ax=self.figureAxis, view=self.PeriodogramState["View"])
if(self.PeriodogramState["View"] == "period"):