Skip to content

Commit

Permalink
Add note about ASN protocol and fix references.
Browse files Browse the repository at this point in the history
  • Loading branch information
atrabattoni committed Sep 17, 2024
1 parent c7b3102 commit 3705ac4
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
:maxdepth: 1
xdas
atoms
io
fft
signal
processing
parallel
processing
signal
synthetics
virtual
atoms
```
27 changes: 27 additions & 0 deletions docs/api/io.md
Original file line number Diff line number Diff line change
@@ -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
```
5 changes: 5 additions & 0 deletions docs/user-guide/streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
```

0 comments on commit 3705ac4

Please sign in to comment.