create timestamp directly after receiving the data
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import argparse
|
||||
from time import time_ns
|
||||
|
||||
import numpy as np
|
||||
|
||||
@@ -52,8 +53,12 @@ def work(backend_addr, accumulator_addr, visualisation_addr, fn_peakfinder_param
|
||||
if not zmq_socks.has_data():
|
||||
continue
|
||||
|
||||
|
||||
raw_image, metadata = zmq_socks.get_data()
|
||||
|
||||
timestamp = time_ns()
|
||||
|
||||
|
||||
if metadata["shape"] == [2, 2]: # this is used as marker for empty images
|
||||
continue
|
||||
|
||||
@@ -69,6 +74,7 @@ def work(backend_addr, accumulator_addr, visualisation_addr, fn_peakfinder_param
|
||||
results = metadata.copy()
|
||||
results.update(peakfinder_parameters)
|
||||
|
||||
results["timestamp"] = timestamp
|
||||
results["number_of_spots"] = 0
|
||||
results["is_hit_frame"] = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user