Skip to content

Commit

Permalink
better
Browse files Browse the repository at this point in the history
  • Loading branch information
mscheltienne committed Aug 6, 2024
1 parent 3218746 commit 21f496d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The development of ``MNE-LSL`` is supported by the
resources/install.rst
api/index.rst
resources/command_line.rst
resources/processing.rst
resources/implementations.rst
generated/tutorials/index.rst
generated/examples/index.rst
changes/index.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
.. include:: ../links.inc

Implementation details
======================

Processing
==========
----------

The :class:`~mne_lsl.stream.StreamLSL` and :class:`~mne_lsl.stream.EpochsStream` object
support processing in real-time of their internal buffers. The processing is done
sequentially and this page presents the available processing and their application
order.

StreamLSL
---------
~~~~~~~~~

Processing is applied to new samples available in the
:class:`~mne_lsl.lsl.StreamInlet` before rolling the buffer of the
Expand All @@ -34,7 +37,7 @@ The processing is defined in the private ``_acquire`` method of the class
:width: 100%

EpochsStream
------------
~~~~~~~~~~~~

Processing is applied to new events and samples available to a
:class:`~mne_lsl.stream.EpochsStream` before rolling the buffer of the
Expand Down
8 changes: 4 additions & 4 deletions doc/resources/pylsl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Differences with pylsl
======================

Faster chunk pull
~~~~~~~~~~~~~~~~~
-----------------

Arguably the most important difference, pulling a chunk of numerical data with
:meth:`~mne_lsl.lsl.StreamInlet.pull_chunk` is much faster than with its
Expand Down Expand Up @@ -62,7 +62,7 @@ Note that this performance improvement is absent for ``string`` based streams. F
:issue:`225` for more information.

Convenience methods
~~~~~~~~~~~~~~~~~~~
-------------------

A :class:`~mne_lsl.lsl.StreamInfo` has several convenience methods to retrieve and set
channel attributes: names, types, units.
Expand All @@ -84,7 +84,7 @@ be set or retrieved directly from a :class:`~mne.Info` object with
:meth:`~mne_lsl.lsl.StreamInfo.get_channel_info`.

Improve arguments
~~~~~~~~~~~~~~~~~
-----------------

The arguments of a :class:`~mne_lsl.lsl.StreamInfo`, :class:`~mne_lsl.lsl.StreamInlet`,
:class:`~mne_lsl.lsl.StreamOutlet` support a wider variety of types. For instance:
Expand All @@ -98,7 +98,7 @@ Overall, the arguments are checked in ``mne_lsl.lsl``. Any type or value mistake
raise an helpful error message.

Unique resolve function
~~~~~~~~~~~~~~~~~~~~~~~
-----------------------

`pylsl <lsl python_>`_ has several stream resolving functions:

Expand Down
8 changes: 4 additions & 4 deletions mne_lsl/stream/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def add_reference_channels(
Notes
-----
Read about the :ref:`processing applied to the underlying
buffer <resources/processing:StreamLSL>`.
buffer <resources/implementations:StreamLSL>`.
"""
self._check_connected_and_regular_sampling("add_reference_channels()")
self._check_not_epoched("add_reference_channels()")
Expand Down Expand Up @@ -490,7 +490,7 @@ def filter(
Notes
-----
Read about the :ref:`processing applied to the underlying
buffer <resources/processing:StreamLSL>`.
buffer <resources/implementations:StreamLSL>`.
"""
self._check_connected_and_regular_sampling("filter()")
if len(self._epochs) != 0:
Expand Down Expand Up @@ -678,7 +678,7 @@ def notch_filter(
Notes
-----
Read about the :ref:`processing applied to the underlying
buffer <resources/processing:StreamLSL>`.
buffer <resources/implementations:StreamLSL>`.
"""
self._check_connected_and_regular_sampling("notch_filter()")
if len(self._epochs) != 0:
Expand Down Expand Up @@ -923,7 +923,7 @@ def set_eeg_reference(
Notes
-----
Read about the :ref:`processing applied to the underlying
buffer <resources/processing:StreamLSL>`.
buffer <resources/implementations:StreamLSL>`.
"""
self._check_connected_and_regular_sampling("set_eeg_reference()")
self._check_not_epoched("set_eeg_reference()")
Expand Down
2 changes: 1 addition & 1 deletion mne_lsl/stream/epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class EpochsStream:
in the connected ``stream`` are ignored.
Read about the :ref:`processing applied to the underlying
buffer <resources/processing:StreamLSL>`.
buffer <resources/implementations:EpochsStream>`.
"""

def __init__(
Expand Down

0 comments on commit 21f496d

Please sign in to comment.