You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/User-Manual/Plugins/CNN-Ripple.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,6 @@ More information
54
54
55
55
A more detailed characterization of this plugin's performance can be found in the following publication:
56
56
57
-
Andrea Navas-Olive, Rodrigo Amaducci, Maria-Teresa Juardo-Parras, Enrique R Sebastian, and Liset M de la Prida (2022) `"Deep learning based feature extraction for prediction and interpretation of sharp-wave ripples in the rodent hippocampus" <https://elifesciences.org/articles/77772v1>`__ *eLife* **11**: e77772
57
+
Andrea Navas-Olive, Rodrigo Amaducci, Maria-Teresa Juardo-Parras, Enrique R Sebastian, and Liset M de la Prida (2022) `"Deep learning based feature extraction for prediction and interpretation of sharp-wave ripples in the rodent hippocampus" <https://elifesciences.org/articles/77772>`__ *eLife* **11**: e77772
58
58
59
59
If you use this plugin in your work, be sure to cite this article!
Copy file name to clipboardExpand all lines: source/User-Manual/Plugins/Python-Processor.rst
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,16 +22,17 @@ Python Processor
22
22
Installing and upgrading
23
23
###########################
24
24
25
-
The Python Processor is not yet released for version 1.0 of the Open Ephys GUI. An announcement will be made via Discord/Slack when it's available for download via Plugin Installer.
25
+
The Python Processor plugin is not included by default in the Open Ephys GUI. To install, use ctrl-P or ⌘P to open the Plugin Installer, browse to the "Python Processor" plugin, and click the "Install" button.
26
+
27
+
The Plugin Installer also allows you to upgrade to the latest version of this plugin, if it's already installed.
28
+
26
29
27
30
Setting up a Python environment
28
31
####################################
29
32
30
33
This plugin must be able to find a local installation of Python version **3.10** with :code:`numpy` installed correctly.
31
34
32
-
To avoid conflicts with other Python installations, we recommend using `Conda <https://docs.conda.io/projects/conda/en/stable/index.html>`__ to manage your Python environments. You can install Conda either using Miniconda or Anaconda by following the instructions `here <https://docs.conda.io/projects/conda/en/stable/user-guide/install/download.html>`__. More information on how to use Conda can be found `here <https://docs.conda.io/projects/conda/en/stable/user-guide/getting-started.html>`__.
33
-
34
-
.. important:: On macOS, conda needs to be installed using the x86_64 Miniconda / Anaconda installer.
35
+
To avoid conflicts with other Python installations, we recommend using `Conda <https://docs.conda.io/projects/conda/en/stable/index.html>`__ to manage your Python environments. You can install Conda either using Miniconda or Anaconda by following the instructions `here <https://docs.conda.io/projects/conda/en/stable/user-guide/install/index.html>`__. More information on how to use Conda can be found `here <https://docs.conda.io/projects/conda/en/stable/user-guide/getting-started.html>`__.
35
36
36
37
To create a new Conda environment that uses Python 3.10, enter the following :code:`conda` command in your Anaconda prompt (Windows) or Terminal (Linux and macOS):
37
38
@@ -51,32 +52,26 @@ After this, :code:`numpy` needs to be installed in the same environment as follo
51
52
52
53
conda install numpy
53
54
54
-
.. important:: On Windows, if you use :code:`pip` to install Python packages, the plugin will fail to load your Python module. We are still investigating the cause of this issue.
55
-
56
55
57
56
Setting the Python Interpreter Path
58
57
-------------------------------------
59
58
60
-
Once a dedicated Python 3.10 Conda environment has been created, the plugin is ready to be loaded into any desired signal chain. As soon as the plugin is dropped into the signal chain, it asks for the path to Python Home directory, which is where the Python Interpreter is located. This allows the plugin to be flexible in terms of which Python libraries to use during runtime, and not rely on the system PATH to figure out the Python Home location.
61
-
62
-
When using Conda, this path is usually where the Conda environment got created. Some examples of where it may be located:
63
-
64
-
* Windows: :code:`C:\\Users\\<username>\\miniconda3` or :code:`C:\\miniconda3`
65
-
66
-
* macOS - :code:`~/miniconda3` or :code:`/Users/<username>/miniconda3`
59
+
After creating a dedicated Python 3.10 Conda environment, you can add the plugin to any signal chain. When inserted, the plugin prompts you to select the Python Home directory—the location of the Python interpreter. Providing this path lets the plugin use libraries from a specific environment at runtime, without relying on the system PATH.
67
60
68
-
* Linux - :code:`~/miniconda3` or :code:`/home/<username>/miniconda3`
61
+
With Conda, this is typically the path to the environment's Python interpreter inside Conda's installation directory. For example, if you created an environment named :code:`oe-python-plugin`, the path would be:
69
62
70
-
The Python image in a Conda environment called “oe-python-plugin” might be in a location such as :code:`${USERHOME}\\miniconda3\\envs\\oe-python-plugin`
* Linux - :code:`~/miniconda3/envs/oe-python-plugin`
71
66
72
-
If you have installed Anaconda instead of Miniconda, the folder might be named :code:`Anaconda` or :code:`Anaconda3`.
67
+
If you installed Anaconda instead of Miniconda, the folder may be named :code:`Anaconda` or :code:`Anaconda3`.
73
68
74
-
Once the path is selected, the plugin should load into the signal chain successfully. If it fails to load the Python Interpreter, then it will ask for the PATH to Python Home again. This means that either the provided PATH was incorrect, or an incompatible version of Python was installed (i.e., not 3.10). If this happens, it is recommended to close and relaunch the GUI to reset the PATH variables.
69
+
After you select the path, the plugin should load into the signal chain. If it cannot load the interpreter, it will prompt for the Python Home path again—this usually indicates an incorrect path or an incompatible Python version (not 3.10). If the problem persists, close and relaunch the GUI to reset the PATH variables.
75
70
76
71
Creating & loading a Python Module
77
72
####################################
78
73
79
-
Once the plugin is loaded into the signal chain, a Python module (script) needs to be loaded into the GUI. This module should take the same form as the `processor template <https://github.com/open-ephys-plugins/python-processor/blob/main/Modules/template/processor_template.py>`__ provided in the plugin's GitHub repository. The :code:`PyProcessor` class is designed to expose the following functions to the Python module to allow interaction with the incoming data:
74
+
After the plugin is added to the signal chain, you must load a Python module (script) into the GUI. This script should follow the structure of the `processor template <https://github.com/open-ephys-plugins/python-processor/blob/main/Modules/template/processor_template.py>`__ available in the plugin's GitHub repository. The :code:`PyProcessor` class provides the following functions to the Python module, enabling interaction with incoming data:
@@ -136,25 +131,30 @@ Using this template, any type of data processing can be done in Python in real-t
136
131
137
132
.. Note:: Pay careful attention to the latency introduced by processing data in Python, especially with high-channel-count data.
138
133
134
+
----------------------
139
135
140
-
There is also a way to send TTL events back from Python to C++. These events will be added to the event buffer for the downstream processors to handle. It is possible using a C++ function exposed to the Python module via an embedded module called :code:`oe_pyprocessor`.
136
+
You can also send TTL events from Python back to C++. These events are added to the event buffer and can be processed by downstream plugins. This is accomplished using a C++ function exposed to Python through the embedded :code:`oe_pyprocessor` module.
141
137
142
138
.. py:method:: add_python_event(line, state)
143
-
144
-
Send TTL event from Python to C++
145
-
139
+
140
+
Sends a TTL event from Python to C++.
141
+
146
142
:param int line: event line number [0-255]
147
143
:param bool state: event state True (ON) or False (OFF)
148
144
149
-
To use this function, the :code:`oe_pyprocessor` module needs to be imported inside the script and then the C++ function can be invoked by using the processor object provided in the :py:meth:`__init__` method, like this: :code:`self.processor.add_python_event(line, state)`
145
+
To use this function, import the :code:`oe_pyprocessor` module in your script. Then, call the C++ function using the processor object provided in the :py:meth:`__init__` method, for example: :code:`self.processor.add_python_event(line, state)`
146
+
147
+
----------------------
150
148
151
-
An example script is provided in the plugin's GitHub repository in the form of a `Butterworth Bandpass filter <https://github.com/open-ephys-plugins/python-processor/blob/main/Modules/examples/bandpass_filter.py>`__. This filter is the same as the one used in the GUI's built-in Filter Node plugin.
149
+
An example script is provided in the plugin's GitHub repository in the form of a `Butterworth Bandpass filter <https://github.com/open-ephys-plugins/python-processor/blob/main/Modules/examples/bandpass_filter.py>`__. This filter is the same as the one used in the GUI's built-in :ref:`bandpassfilter` plugin.
152
150
153
151
Limitations
154
152
######################
155
153
156
154
* Unlike continuous data and events, sending spikes back from Python is not currently possible.
157
155
156
+
* With increasing channel counts, the processing latency may also increase, potentially affecting real-time performance.
157
+
158
158
* Only one instance of the plugin is allowed at a time in a signal chain. Having multiple instances of the plugin in the same signal chain will result in random crashes.
159
159
160
160
* Creating visualizations in real-time using Python libraries such as :code:`matplotlib` is not possible.
0 commit comments