w
CI for superxas_bec / test (pull_request) Successful in 32s
CI for superxas_bec / test (push) Successful in 38s

This commit is contained in:
2025-12-19 14:41:19 +01:00
parent 0aa0211d57
commit e26ee66004
+7 -2
View File
@@ -426,6 +426,7 @@ class Timepix(PSIDeviceBase, TimePixControl):
tds_period = []
tds_total_events = 0
total_periods = 0
data_frame_freq = 131000 / start_frame.get("save_interval", 1) # in Hz
logger.info(
f"Processing TimepixFly data: start_frame: {start_frame}, end_frame: {end_frame}"
)
@@ -441,11 +442,15 @@ class Timepix(PSIDeviceBase, TimePixControl):
for ii in range(n_energy_points):
xes_data[ii, :] += msg["TDSpectra"][ii::n_energy_points]
tds_period = np.array(tds_period) / start_frame.get("save_interval", 1)
tds_period = (
np.array(tds_period) / start_frame.get("save_interval", 1) / data_frame_freq
)
total_periods = end_frame.get("periods", None)
if total_periods is not None:
self.total_periods.put(total_periods / start_frame.get("save_interval", 1))
self.total_periods.put(
total_periods / start_frame.get("save_interval", 1) / data_frame_freq
)
else:
logger.error(f"Received total_periods: {total_periods} from end_frame {end_frame}.")