Skip to content
Snippets Groups Projects

[AGIPD] Read bias_voltage for AGIPD at SPB and MID from RUN source

Merged Karim Ahmed requested to merge fix/get_bias_voltage_SPB_MID into master
1 file
+ 15
7
Compare changes
  • Side-by-side
  • Inline
+ 15
7
@@ -192,11 +192,16 @@ class AgipdCtrl:
if "AGIPD1M" in karabo_id_control:
voltage_src = (
f"{karabo_id_control[:-1]}/PSC/HV",
f"channels.U{module}.measurmentSenseVoltage.value")
f"channels.U{module}.measurementSenseVoltage.value")
# TODO: Validate if removing this and depend on adding voltage value
# from the Notebook's first cell.
default_voltage = 300
else: # AGIPD500K
voltage_src = (
f"{karabo_id_control}/FPGA/M_{module}",
"highVoltage.actual.value")
default_voltage = None
if (
voltage_src[0] in self.run_dc.all_sources and
@@ -206,12 +211,15 @@ class AgipdCtrl:
else:
# TODO: Validate if removing this and
# and using NB value for old RAW data.
print(
"WARNING: Unable to read bias_voltage from"
f" {voltage_src[0]}/{voltage_src[1].replace('.','/')} "
"Returning 300 as default bias voltage value."
)
return 300
error = ("ERROR: Unable to read bias_voltage from"
f" {voltage_src[0]}/{voltage_src[1].replace('.','/')}.")
if default_voltage:
print(f"{error} Returning {default_voltage} "
"as default bias voltage value.")
else:
raise ValueError(error)
return default_voltage
def get_integration_time(self) -> int:
"""Read integration time from the FPGA device.
Loading