astrodatagui: FlaredectorWidget: set proper normalization for collections
This commit is contained in:
@@ -190,7 +190,7 @@ class AstrodataGUI(QtWidgets.QMainWindow):
|
||||
self.flaredetectorPreview.setFitsFile(filePath, mainName)
|
||||
|
||||
def btCombineSeqClicked(self):
|
||||
self.gbPlotOptionsNormalize.setEnabled(False)
|
||||
#self.gbPlotOptionsNormalize.setEnabled(False)
|
||||
mainName = self.listDownloaded.currentItem().text()
|
||||
filePaths = []
|
||||
for item in self.listSequences.selectedItems():
|
||||
|
||||
@@ -146,13 +146,22 @@ class FlaredetectorWidget(QtWidgets.QWidget):
|
||||
self.FlattenState["Enabled"] = False
|
||||
self.updatePlot()
|
||||
|
||||
def normalizeStichedLightCurve(self, lc):
|
||||
print(lc, self.NormalizeState["Scale"])
|
||||
return lc.normalize(unit=self.NormalizeState["Scale"])
|
||||
|
||||
def updatePlot(self):
|
||||
lc = self.currentLC
|
||||
label = f"{self.currentMainName}"
|
||||
lc.flux = lc[self.fluxType]
|
||||
if(self.NormalizeState["Enabled"]):
|
||||
lc = lc.normalize(unit=self.NormalizeState["Scale"])
|
||||
if(self.currentLCCollection is None):
|
||||
print("normalizing normal lc")
|
||||
lc = lc.normalize(unit=self.NormalizeState["Scale"])
|
||||
else:
|
||||
print("normalizing collection")
|
||||
lc = self.currentLCCollection.stitch(self.normalizeStichedLightCurve)
|
||||
label += " - normalized"
|
||||
lc.flux = lc[self.fluxType]
|
||||
if(self.RemoveOutliersState["Enabled"]):
|
||||
lc = lc.remove_outliers(sigma=self.RemoveOutliersState["Sigma"])
|
||||
label += " - no ol"
|
||||
|
||||
Reference in New Issue
Block a user