astrodatagui: FlaredetectorWidget: show folded fit

This commit is contained in:
2024-06-19 10:56:47 +02:00
parent b35d59b928
commit b1a7c36f22
+4 -2
View File
@@ -4,13 +4,13 @@ from matplotlib.figure import Figure
from matplotlib.backends.backend_qtagg import (
FigureCanvas, NavigationToolbar2QT as NavigationToolbar)
from astropy.io import fits
from astropy.visualization import time_support
import lightkurve as lk
from ...flaredetector.util import (findMaxIndices, plotFlarePeaks,
plotFlareFits, markFlare,
convertStarndardIndexToFoldedIndex)
convertStarndardIndexToFoldedIndex,
getFoldedBestFit)
from ...flaredetector.flaredetector import calculateFlareFitsForLightcurve
class FlaredetectorWidget(QtWidgets.QWidget):
@@ -254,6 +254,8 @@ class FlaredetectorWidget(QtWidgets.QWidget):
cycle, foldedIndex = convertStarndardIndexToFoldedIndex(lc, peak["StandardIndex"])
self.figureAxis.plot(lc.phase[lc.cycle == cycle][foldedIndex].value,
lc.flux[lc.cycle == cycle][foldedIndex], "x", color="red")
phase, sineFit = getFoldedBestFit(lc)
self.figureAxis.plot(phase, sineFit, color="red")
elif(self.PeriodogramState["Enabled"]):
lc.plot(label=label, ax=self.figureAxis, view=self.PeriodogramState["View"])
if(self.PeriodogramState["View"] == "period"):