style: format

This commit is contained in:
David Perl
2026-09-09 22:56:21 +02:00
committed by perl_d
parent 6e4e28ca8c
commit 477d72a46c
2 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -214,7 +214,7 @@ class BeamlineDevices:
try:
with suppress_output():
return self._dispatch.bec_macros.full_flux_ph_per_s()
except Exception as e:
except Exception as e: #noqa
logger.error(f"Could not get flux from BEC macro {e}")
return 9.99e12
+3 -4
View File
@@ -169,18 +169,17 @@ class StatusBar(QStatusBar):
def update_daq_status(self, status: DAQStatusModel):
try:
self._status = status
if status.bl.flux_ph_s is None:
if status.bl.flux_ph_s is None or status.bl.transmission is None:
self.flux.set_value("0")
else:
try:
num = f"{status.bl.flux_ph_s:.2E}"
num = f"{(status.bl.flux_ph_s / status.bl.transmission):.2E}"
mod, exp = num.split("E")
self.flux.set_value(f"{mod} x 10<sup>{int(exp)}</sup>")
except Exception as e:
except Exception as e: #noqa
logger.error(f"Error parsing flux result: {e}")
self.flux.set_value(f"{status.bl.flux_ph_s:.2E}")
if status.bl.transmission is None:
self.transmission.set_value("(moving)")
else: