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"])
|
||||
|
||||
def updateFit(self):
|
||||
self.peaks, self.fits = calculateFlareFitsForLightcurve(self.currentLC.flatten(window_length=self.FlattenState["WindowLength"],
|
||||
polyorder=self.FlattenState["PolynomialOrder"]), num=100)
|
||||
lc = self.currentLC
|
||||
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):
|
||||
lc = self.currentLC
|
||||
@@ -196,11 +199,8 @@ class FlaredetectorWidget(QtWidgets.QWidget):
|
||||
lc = lc.bin(time_bin_size=self.BinState["Size"])
|
||||
label += " - binned"
|
||||
if(self.FlattenState["Enabled"]):
|
||||
lc = lc.flatten(window_length=self.FlattenState["WindowLength"],
|
||||
polyorder=self.FlattenState["PolynomialOrder"])
|
||||
lc = self.currentFlattenLC
|
||||
label += " - flattened"
|
||||
|
||||
#maxPowers = findMaxIndices(lc, 100, height=1.005, distance=1)
|
||||
if(self.FoldState["Enabled"]):
|
||||
lc = lc.fold(period=self.FoldState["Period"],
|
||||
epoch_time=self.FoldState["EpochTime"])
|
||||
|
||||
Reference in New Issue
Block a user