astrodatagui: FlaredetectorWidget: fix normalize
This commit is contained in:
@@ -148,12 +148,13 @@ class FlaredetectorWidget(QtWidgets.QWidget):
|
|||||||
self.updatePlot()
|
self.updatePlot()
|
||||||
|
|
||||||
def normalizeStichedLightCurve(self, lc):
|
def normalizeStichedLightCurve(self, lc):
|
||||||
print(lc, self.NormalizeState["Scale"])
|
lc.flux = lc[self.fluxType]
|
||||||
return lc.normalize(unit=self.NormalizeState["Scale"])
|
return lc.normalize(unit=self.NormalizeState["Scale"])
|
||||||
|
|
||||||
def updatePlot(self):
|
def updatePlot(self):
|
||||||
lc = self.currentLC
|
lc = self.currentLC
|
||||||
label = f"{self.currentMainName}"
|
label = f"{self.currentMainName}"
|
||||||
|
lc.flux = lc[self.fluxType]
|
||||||
if(self.NormalizeState["Enabled"]):
|
if(self.NormalizeState["Enabled"]):
|
||||||
if(self.currentLCCollection is None):
|
if(self.currentLCCollection is None):
|
||||||
print("normalizing normal lc")
|
print("normalizing normal lc")
|
||||||
@@ -162,7 +163,6 @@ class FlaredetectorWidget(QtWidgets.QWidget):
|
|||||||
print("normalizing collection")
|
print("normalizing collection")
|
||||||
lc = self.currentLCCollection.stitch(self.normalizeStichedLightCurve)
|
lc = self.currentLCCollection.stitch(self.normalizeStichedLightCurve)
|
||||||
label += " - normalized"
|
label += " - normalized"
|
||||||
lc.flux = lc[self.fluxType]
|
|
||||||
if(self.RemoveOutliersState["Enabled"]):
|
if(self.RemoveOutliersState["Enabled"]):
|
||||||
lc = lc.remove_outliers(sigma=self.RemoveOutliersState["Sigma"])
|
lc = lc.remove_outliers(sigma=self.RemoveOutliersState["Sigma"])
|
||||||
label += " - no ol"
|
label += " - no ol"
|
||||||
|
|||||||
Reference in New Issue
Block a user