Skip to content

Commit

Permalink
doc: update micromed buffer doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne de Montalivet committed Dec 18, 2023
1 parent 41dca79 commit b7f3c50
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ See details in next sections
:alt: StreamPlayer
:align: center


.. _emulate TRC:

Emulate Online Micromed TCP from *.trc* file
--------------------------------------------

Expand Down Expand Up @@ -121,13 +124,13 @@ repo <https://github.com/etiennedemontalivet/micromed-io>`__ in
emulate/read TCP script, launch the reader first that acts as server,
then the emulator.

Read Micromed TCP in a sliding window buffer
--------------------------------------------
Read online Micromed TCP in a sliding window buffer
---------------------------------------------------

If you plan to use the Micromed data as input of a decoder, you probably
want epochs of format ``(n_channels, n_samples)``. Then the
``MicromedBuffer`` class is for you. The script ``read_tcp_to_epoch.py``
show you how to use it (see the ``PROCESS HERE`` comment). It uses a
``MicromedBuffer`` class is for you. The script ``tcp_to_epoch.py``
shows you how to use it (see the ``PROCESS HERE`` comment). It uses a
**buffer** that mimics the **sliding window** and triggers each time it
is filled.

Expand All @@ -136,6 +139,17 @@ is filled.
from micromed_io.buffer import MicromedBuffer
micromed_buffer = MicromedBuffer(epoch_duration=5, epoch_overlap=2.5)
To run the example, you can download and run the ``tcp_to_epoch.py`` script in ``extern/``
folder:

.. code:: bash
$ python tcp_to_epoch.py --epoch-size=5 --overlap=2.5
.. note::

Try it with **emulated data** from a TRC file (cf `emulate TRC`_)

Rename TRC files with recording datetime
----------------------------------------

Expand Down

0 comments on commit b7f3c50

Please sign in to comment.