diff --git a/dap/accumulator.py b/dap/accumulator.py index 81bd6f7..16f1977 100644 --- a/dap/accumulator.py +++ b/dap/accumulator.py @@ -8,13 +8,6 @@ from zmqsocks import ZMQSocketsAccumulator, make_address OUTPUT_DIR = "/gpfs/photonics/swissfel/buffer/dap/data" -ENTRIES_TO_SEND = ( - "frame", - "is_good_frame", - "number_of_spots", - "saturated_pixels" -) - def main(): parser = argparse.ArgumentParser() @@ -68,7 +61,14 @@ def accumulate(accumulator_addr, bsread_port): continue timestamp = tuple(results["timestamp"]) - data = {f"{detector}:{k}": results[k] for k in ENTRIES_TO_SEND} + + data = {} + for k, v in results.items(): + if isinstance(v, bool): + v = int(v) + elif isinstance(v, list) and not v: + v = None + data[f"{detector}:{k}"] = v sorter.add(pulse_id, (timestamp, data))