refactor(timepix): comment accumalated data signals.
CI for superxas_bec / test (push) Failing after 1m12s
CI for superxas_bec / test (pull_request) Failing after 1m9s

This commit is contained in:
2026-05-29 16:44:05 +02:00
parent 31132c1566
commit 1413feabc1
+18 -18
View File
@@ -221,8 +221,8 @@ class Timepix(PSIDeviceBase, TimePixControl):
static_spectra = Cpt(AsyncSignal, name="static_spectra", ndim=1, max_size=1000, acquisition_group="monitored", async_update={"type": "add", "max_shape": [None, DETECTOR_SHAPE[0]]}, doc="Spectra signal of the TimePix detector.")
xes_data_accumulated_1 = Cpt(AsyncSignal, name="xes_accumulated_energy_1", ndim=1, max_size=1000, doc="1D time spectra for energy bin 2.")
xes_data_accumulated_2 = Cpt(AsyncSignal, name="xes_accumulated_energy_2", ndim=1, max_size=1000, doc="1D time spectra for energy bin 2.")
# xes_data_accumulated_1 = Cpt(AsyncSignal, name="xes_accumulated_energy_1", ndim=1, max_size=1000, doc="1D time spectra for energy bin 2.")
# xes_data_accumulated_2 = Cpt(AsyncSignal, name="xes_accumulated_energy_2", ndim=1, max_size=1000, doc="1D time spectra for energy bin 2.")
file_event = Cpt(FileEventSignal, name="file_event", doc="File event signal for TimePix detector.")
# fmt: on
@@ -407,22 +407,22 @@ class Timepix(PSIDeviceBase, TimePixControl):
data_2 = np.sum(xes_data[:, 4:8], axis=1)
self.xes_energy_1.put(data_1, async_update={"type": "add", "max_shape": [None, troin]})
self.xes_energy_2.put(data_2, async_update={"type": "add", "max_shape": [None, troin]})
if self.accumulated_data_e1 is None:
self.accumulated_data_e1 = data_1
else:
self.accumulated_data_e1 += data_1
if self.accumulated_data_e2 is None:
self.accumulated_data_e2 = data_2
else:
self.accumulated_data_e2 += data_2
self.xes_data_accumulated_1.put(
self.accumulated_data_e1,
async_update={"type": "replace", "max_shape": [None, troin]},
)
self.xes_data_accumulated_2.put(
self.accumulated_data_e2,
async_update={"type": "replace", "max_shape": [None, troin]},
)
# if self.accumulated_data_e1 is None:
# self.accumulated_data_e1 = data_1
# else:
# self.accumulated_data_e1 += data_1
# if self.accumulated_data_e2 is None:
# self.accumulated_data_e2 = data_2
# else:
# self.accumulated_data_e2 += data_2
# self.xes_data_accumulated_1.put(
# self.accumulated_data_e1,
# async_update={"type": "replace", "max_shape": [None, troin]},
# )
# self.xes_data_accumulated_2.put(
# self.accumulated_data_e2,
# async_update={"type": "replace", "max_shape": [None, troin]},
# )
self.xes_spectra.put(
xes_data.sum(axis=1), async_update={"type": "add", "max_shape": [None, troin]}
)