astrodatagui: FlaredetectorWidget: use proper flux to fit
This commit is contained in:
@@ -170,8 +170,11 @@ class FlaredetectorWidget(QtWidgets.QWidget):
|
|||||||
return lc.normalize(unit=self.NormalizeState["Scale"])
|
return lc.normalize(unit=self.NormalizeState["Scale"])
|
||||||
|
|
||||||
def updateFit(self):
|
def updateFit(self):
|
||||||
self.peaks, self.fits = calculateFlareFitsForLightcurve(self.currentLC.flatten(window_length=self.FlattenState["WindowLength"],
|
lc = self.currentLC
|
||||||
polyorder=self.FlattenState["PolynomialOrder"]), num=100)
|
lc.flux = lc[self.fluxType]
|
||||||
|
self.currentFlattenLC = lc.flatten(window_length=self.FlattenState["WindowLength"],
|
||||||
|
polyorder=self.FlattenState["PolynomialOrder"])
|
||||||
|
self.peaks, self.fits = calculateFlareFitsForLightcurve(self.currentFlattenLC, num=100)
|
||||||
|
|
||||||
def updatePlot(self):
|
def updatePlot(self):
|
||||||
lc = self.currentLC
|
lc = self.currentLC
|
||||||
@@ -196,11 +199,8 @@ class FlaredetectorWidget(QtWidgets.QWidget):
|
|||||||
lc = lc.bin(time_bin_size=self.BinState["Size"])
|
lc = lc.bin(time_bin_size=self.BinState["Size"])
|
||||||
label += " - binned"
|
label += " - binned"
|
||||||
if(self.FlattenState["Enabled"]):
|
if(self.FlattenState["Enabled"]):
|
||||||
lc = lc.flatten(window_length=self.FlattenState["WindowLength"],
|
lc = self.currentFlattenLC
|
||||||
polyorder=self.FlattenState["PolynomialOrder"])
|
|
||||||
label += " - flattened"
|
label += " - flattened"
|
||||||
|
|
||||||
#maxPowers = findMaxIndices(lc, 100, height=1.005, distance=1)
|
|
||||||
if(self.FoldState["Enabled"]):
|
if(self.FoldState["Enabled"]):
|
||||||
lc = lc.fold(period=self.FoldState["Period"],
|
lc = lc.fold(period=self.FoldState["Period"],
|
||||||
epoch_time=self.FoldState["EpochTime"])
|
epoch_time=self.FoldState["EpochTime"])
|
||||||
|
|||||||
Reference in New Issue
Block a user