Skip to content

Commit

Permalink
doc: fix code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennedemontalivet committed Mar 26, 2024
1 parent a8de20a commit 3caf299
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ Main features:
Install
-------

.. code:: bash
.. code-block:: bash
$ pip install micromed-io
Convert a Micromed (*.trc*) file to MNE (*.fif*) format
-------------------------------------------------------

.. code:: python
.. code-block:: python
from micromed_io.to_mne import create_mne_from_micromed_recording
mne_raw = create_mne_from_micromed_recording("path/to/file.TRC")
Expand All @@ -53,7 +53,7 @@ See details in next sections
Emulate Online Micromed TCP from *.trc* file
--------------------------------------------

.. code:: bash
.. code-block:: bash
$ mmio_emulate_trc --file=../data/sample.TRC --address=localhost --port=5123
Expand All @@ -62,7 +62,7 @@ Emulate the online data stream of Micromed to test your real-time
platform. See all the arguments and adapt them:


.. code:: bash
.. code-block:: bash
$ mmio_emulate_trc --help # to see all arguments
Expand All @@ -75,7 +75,7 @@ platform. See all the arguments and adapt them:
Read TCP and push to LSL Stream
-------------------------------

.. code:: bash
.. code-block:: bash
$ mmio_tcp_to_lsl --address=localhost --port=5123
Expand All @@ -91,22 +91,22 @@ While receiving online data throug tcp, this command forward the data to

You can easily change the LSL parameters:

.. code:: bash
.. code-block:: bash
$ mmio_tcp_to_lsl --help # to see all arguments
Read TRC file
-------------

.. code:: python
.. code-block:: python
from micromed_io.trc import MicromedTRC
mmtrc = MicromedTRC("sample.TRC")
Then you have access to the *trc* data:

.. code:: python
.. code-block:: python
mmtrc.get_header()
mmtrc.get_markers()
Expand All @@ -125,7 +125,7 @@ Download ``tcp_to_lsl.py`` from the `github
repo <https://github.com/etiennedemontalivet/micromed-io>`__ in
*scripts/*

.. code:: bash
.. code-block:: bash
$ python tcp_to_lsl.py --address=localhost --port=5123
Expand All @@ -145,15 +145,15 @@ 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.

.. code:: python
.. code-block:: python
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
.. code-block:: bash
$ python tcp_to_epoch.py --epoch-size=5 --overlap=2.5
Expand All @@ -164,7 +164,7 @@ folder:
Rename TRC files with recording datetime
----------------------------------------

.. code:: bash
.. code-block:: bash
$ mmio_rename_trc --dirpath=./ --format=%Y%m%d-%H%M%S
Expand All @@ -173,7 +173,7 @@ in the filename. Output is : ``<filename>__<recording_date>.TRC``. The
format must be compliant with python `strftime format
codes <https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes>`__

.. code:: bash
.. code-block:: bash
mmio_rename_trc --help # to see help
Expand All @@ -182,7 +182,7 @@ Local install

Download the repo and:

.. code:: bash
.. code-block:: bash
$ conda env create -f environment.yml
$ conda activate mmio
Expand Down

0 comments on commit 3caf299

Please sign in to comment.