From b4d20d8ddaaa97efaa87f43fd5db8885d34ebf72 Mon Sep 17 00:00:00 2001 From: etiennedemontalivet Date: Tue, 26 Mar 2024 09:14:56 +0100 Subject: [PATCH] Reapply "doc: fix code blocks" This reverts commit 6f4616fab95bae5e70a67624883d5153ebb11387. --- README.rst | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.rst b/README.rst index ec44c23..0347c25 100644 --- a/README.rst +++ b/README.rst @@ -25,7 +25,7 @@ Main features: Install ------- -.. code:: bash +.. code-block:: bash $ pip install micromed-io @@ -33,7 +33,7 @@ Install 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") @@ -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 @@ -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 @@ -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 @@ -91,7 +91,7 @@ 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 @@ -99,14 +99,14 @@ You can easily change the LSL parameters: 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() @@ -125,7 +125,7 @@ Download ``tcp_to_lsl.py`` from the `github repo `__ in *scripts/* -.. code:: bash +.. code-block:: bash $ python tcp_to_lsl.py --address=localhost --port=5123 @@ -145,7 +145,7 @@ 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) @@ -153,7 +153,7 @@ is filled. 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 @@ -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 @@ -173,7 +173,7 @@ in the filename. Output is : ``__.TRC``. The format must be compliant with python `strftime format codes `__ -.. code:: bash +.. code-block:: bash mmio_rename_trc --help # to see help @@ -182,7 +182,7 @@ Local install Download the repo and: -.. code:: bash +.. code-block:: bash $ conda env create -f environment.yml $ conda activate mmio