European-XFEL / karabo-bridge-py

Tools to allow data exchange with Karabo, in particular streaming of data
BSD 3-Clause "New" or "Revised" License
9 stars 4 forks source link

Enable generating multisource messages. #25

Closed zhujun98 closed 6 years ago

zhujun98 commented 6 years ago

To generate multi-source data, use start_gen(port, ns=2). The source names will be the default source name appended by "-1", "-2", e.g. "SPB_DET_AGIPD1M-1/DET/detector-1", "SPB_DET_AGIPD1M-1/DET/detector-2".

The default start_gen(port) behaves the same as before.

tmichela commented 6 years ago

LGTM

takluyver commented 6 years ago

Would it be better to have a more realistic simulation of multiple sources, e.g. 16 detector modules, rather than duplicating the combined output of a full detector?

takluyver commented 6 years ago

Also, if we stick with this approach, I'd like a name like nsources rather than just ns.

zhujun98 commented 6 years ago

I agree it would be nice to have a "real" simulation of multiple sources in the future. But the point is, now we need something to test the client's ability to parse a multi-source data, and it does not matter whether they have the same content or not. Thomas and I tested the cpp client on the online cluster yesterday with real data, and it works very well. At least, this means that the data content generated by the current simulator is good enough to mimic the real data.