From 3705ac46d2503d51eca3bbc5f8d8b5b7f62fe283 Mon Sep 17 00:00:00 2001 From: Alister Trabattoni Date: Tue, 17 Sep 2024 18:30:03 +0200 Subject: [PATCH] Add note about ASN protocol and fix references. --- docs/api/index.md | 7 ++++--- docs/api/io.md | 27 +++++++++++++++++++++++++++ docs/user-guide/streaming.md | 5 +++++ 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 docs/api/io.md diff --git a/docs/api/index.md b/docs/api/index.md index 6a1c662..3f2d665 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -4,11 +4,12 @@ :maxdepth: 1 xdas +atoms +io fft -signal -processing parallel +processing +signal synthetics virtual -atoms ``` \ No newline at end of file diff --git a/docs/api/io.md b/docs/api/io.md new file mode 100644 index 0000000..4e2836c --- /dev/null +++ b/docs/api/io.md @@ -0,0 +1,27 @@ +```{eval-rst} +.. currentmodule:: xdas.io +``` + +# xdas.io + +```{eval-rst} +.. autosummary:: + :toctree: ../_autosummary + + get_free_port +``` + +```{eval-rst} +.. currentmodule:: xdas.io.asn +``` + + +## ASN + +```{eval-rst} +.. autosummary:: + :toctree: ../_autosummary + + ZMQPublisher + ZMQSubscriber +``` diff --git a/docs/user-guide/streaming.md b/docs/user-guide/streaming.md index cba8412..b582eb6 100644 --- a/docs/user-guide/streaming.md +++ b/docs/user-guide/streaming.md @@ -79,8 +79,13 @@ To reduce the volume of the transmitted data, compression is often useful. Xdas import hdf5plugin +address = f"tcp://localhost:{xd.io.get_free_port()}" encoding = {"chunks": (10, 10), **hdf5plugin.Zfp(accuracy=1e-6)} publisher = ZMQPublisher(address, encoding) # Add encoding here, the rest is the same ``` +{py:class}`~xdas.io.asn.ZMQSubscriber` +```{note} +Xdas also implements the ZeroMQ protocol used by the OptoDAS interrogators by ASN. Equivalent {py:class}`~xdas.io.asn.ZMQPublisher` and {py:class}`~xdas.io.asn.ZMQSubscriber` can be found in {py:mod}`xdas.io.asn`. This can be useful get data in real-time from one instrument of that kind. Note that compression is not available with that protocol yet. +```