diff --git a/main/astrodatagui/AstrodataGUI.py b/main/astrodatagui/AstrodataGUI.py index dd66127..ee007d4 100644 --- a/main/astrodatagui/AstrodataGUI.py +++ b/main/astrodatagui/AstrodataGUI.py @@ -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(): diff --git a/main/astrodatagui/ui/FlaredetectorWidget.py b/main/astrodatagui/ui/FlaredetectorWidget.py index badac0a..4c9acad 100644 --- a/main/astrodatagui/ui/FlaredetectorWidget.py +++ b/main/astrodatagui/ui/FlaredetectorWidget.py @@ -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"