style: format
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user