use converted timestamp in sending

This commit is contained in:
2025-10-16 18:30:33 +02:00
parent 0b8c734782
commit 4f6246fdd0

View File

@@ -3,7 +3,7 @@ import argparse
from bsread.sender import Sender, PUB
from utils import FileHandler, Sorter
from zmqsocks import ZMQSocketsAccumulator, make_address
from zmqsocks import ZMQSocketsAccumulator, make_address, make_bsread_timestamp
OUTPUT_DIR = "/gpfs/photonics/swissfel/buffer/dap/data"
@@ -62,6 +62,7 @@ def accumulate(accumulator_addr, bsread_port):
to_copy = (
"pulse_id",
"timestamp",
"frame",
"is_good_frame",
"number_of_spots",
@@ -73,7 +74,9 @@ def accumulate(accumulator_addr, bsread_port):
sorter.add(pulse_id, data)
ready = sorter.flush_ready()
for pulse_id, data in ready:
sender.send(pulse_id=pulse_id, data=data) #TODO: is there a timestamp in the input?
timestamp = results["timestamp"]
timestamp = make_bsread_timestamp(timestamp, pulse_id)
sender.send(pulse_id=pulse_id, data=data, timestamp=timestamp)