refactor #1

Merged
augustin_s merged 159 commits from refactor into main 2024-10-12 17:09:10 +02:00
Showing only changes of commit 474df55969 - Show all commits

View File

@@ -44,19 +44,11 @@ def work(backend_address, accumulator_host, accumulator_port, visualisation_host
zmq_socks = ZMQSockets(backend_address, accumulator_host, accumulator_port, visualisation_host, visualisation_port)
pulse_id = 0
n_aggregated_images = 1
data_summed = None
while True:
try:
peakfinder_parameters = bj_peakfinder_parameters.load()
except Exception as e:
print(f"({pulse_id}) cannot read peakfinder parameters file: {e}", flush=True) #TODO: logging?
if not zmq_socks.has_data():
continue
@@ -65,8 +57,15 @@ def work(backend_address, accumulator_host, accumulator_port, visualisation_host
if metadata["shape"] == [2, 2]: # this is used as marker for empty images
continue
pulse_id = metadata.get("pulse_id", 0)
try:
peakfinder_parameters = bj_peakfinder_parameters.load()
except Exception as e:
print(f"({pulse_id}) cannot read peakfinder parameters file: {e}", flush=True) #TODO: logging?
results = metadata.copy()
results.update(peakfinder_parameters)