astrodatagui: FlaredetectorWidget: show vlines are border for folded lc fit
This commit is contained in:
@@ -7,10 +7,7 @@ from matplotlib.backends.backend_qtagg import (
|
|||||||
from astropy.visualization import time_support
|
from astropy.visualization import time_support
|
||||||
import lightkurve as lk
|
import lightkurve as lk
|
||||||
|
|
||||||
from ...flaredetector.util import (findMaxIndices, plotFlarePeaks,
|
from ...flaredetector.util import *
|
||||||
plotFlareFits, markFlare,
|
|
||||||
convertStarndardIndexToFoldedIndex,
|
|
||||||
getFoldedBestFit)
|
|
||||||
from ...flaredetector.flaredetector import calculateFlareFitsForLightcurve
|
from ...flaredetector.flaredetector import calculateFlareFitsForLightcurve
|
||||||
|
|
||||||
class FlaredetectorWidget(QtWidgets.QWidget):
|
class FlaredetectorWidget(QtWidgets.QWidget):
|
||||||
@@ -256,6 +253,8 @@ class FlaredetectorWidget(QtWidgets.QWidget):
|
|||||||
lc.flux[lc.cycle == cycle][foldedIndex], "x", color="red")
|
lc.flux[lc.cycle == cycle][foldedIndex], "x", color="red")
|
||||||
phase, sineFit = getFoldedBestFit(lc)
|
phase, sineFit = getFoldedBestFit(lc)
|
||||||
self.figureAxis.plot(phase, sineFit, color="red")
|
self.figureAxis.plot(phase, sineFit, color="red")
|
||||||
|
minPhaseBoundsIndices, maxPhaseBoundsIndices = getPhaseRangesNearPeak(getFoldedFitPeakValley(sineFit), phase)
|
||||||
|
plotPhaseRangesNearPeak((minPhaseBoundsIndices, maxPhaseBoundsIndices), phase, ax=self.figureAxis)
|
||||||
elif(self.PeriodogramState["Enabled"]):
|
elif(self.PeriodogramState["Enabled"]):
|
||||||
lc.plot(label=label, ax=self.figureAxis, view=self.PeriodogramState["View"])
|
lc.plot(label=label, ax=self.figureAxis, view=self.PeriodogramState["View"])
|
||||||
if(self.PeriodogramState["View"] == "period"):
|
if(self.PeriodogramState["View"] == "period"):
|
||||||
|
|||||||
Reference in New Issue
Block a user