diff --git a/main/astrodatagui/ui/FlaredetectorWidget.py b/main/astrodatagui/ui/FlaredetectorWidget.py index c03738a..f29d090 100644 --- a/main/astrodatagui/ui/FlaredetectorWidget.py +++ b/main/astrodatagui/ui/FlaredetectorWidget.py @@ -35,6 +35,13 @@ class FlaredetectorWidget(QtWidgets.QWidget): self.currentMainName = mainName self.updatePlot() + def setFluxType(self, fluxType: str): + if(fluxType not in ["sap_flux", "pdcsap_flux"]): + print(f"FluxType not supported: {fluxType}, setting default sap_flux") + fluxType = "sap_flux" + self.fluxType = fluxType + self.updatePlot() + def setNormalizeState(self, enabled: bool, scale: str): self.NormalizeState["Enabled"] = enabled if(scale not in ["unscaled", "percent", "ppt", "ppm"]): @@ -107,6 +114,7 @@ class FlaredetectorWidget(QtWidgets.QWidget): 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"]) label += " - normalized"