Size: 294
Comment:
|
Size: 2425
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
{{attachment:mne_logo.png|align="right"}} [[https://www.nmr.mgh.harvard.edu/mne/stable/index.html|MNE-Python]] is an open-source Python software for processing neurophysiological signals. Its goal | {{attachment:mne_logo.png||align="right",width="195px"}} [[https://www.nmr.mgh.harvard.edu/mne/stable/index.html|MNE-Python]] is an open-source software for processing neurophysiological signals written with the [[https://en.wikipedia.org/wiki/Python_(programming_language)|Python programming language]]. It provides an interesting library of methods that are not available in Brainstorm, especially for MEG signal pre-processing, statistics and machine learning. Since MATLAB now offers a very efficient [[https://www.mathworks.com/help/matlab/call-python-libraries.html|interface with Python environments]], it makes more sense to use directly the MNE-Python code rather than trying to recode its original features in MATLAB scripts. |
Line 6: | Line 6: |
== Installing Python == | In order to use MNE-Python functions from Brainstorm you will need to: install a Python environment on your computer (version 3.5 or higher), install MNE-Python in your Python environment, and configure Matlab and Brainstorm to connect to this Python environment. For GUI users who are not very familiar with terminals and command-line operations, setting-up a Python environment with MNE-Python working might be a bit of challenge. The programs involved here are subject to frequent changes, we will most likely need to update this page regularly. If the documentation below is incomplete or incorrect, please share your comments on the user forum so that we can improve it. <<TableOfContents(2,2)>> == Installing Python and MNE-Python == First you need to install Python and MNE-Python package on your computer. This is done independently from MATLAB. Follow the installation instructions from the MNE-Python website: https://www.nmr.mgh.harvard.edu/mne/stable/install_mne_python.html == Configuration in Brainstorm == In an ideal configuration, your Python environment is automatically detected and configured by Matlab, and you can use any process using MNE-Python in Brainstorm without any additional configuration. This might be the case on Linux or MacOS, but Windows computers always require some manual setup. The first time you call a process using MNE-Python, if the software is not found automatically, Brainstorm would guide you through the configuration. ==== Locate the Python executable ==== asks you where is your Python executable located on your hard drive, and pyversion |
Using MNE-Python from Brainstorm
Authors: Francois Tadel
MNE-Python is an open-source software for processing neurophysiological signals written with the Python programming language. It provides an interesting library of methods that are not available in Brainstorm, especially for MEG signal pre-processing, statistics and machine learning. Since MATLAB now offers a very efficient interface with Python environments, it makes more sense to use directly the MNE-Python code rather than trying to recode its original features in MATLAB scripts.
In order to use MNE-Python functions from Brainstorm you will need to: install a Python environment on your computer (version 3.5 or higher), install MNE-Python in your Python environment, and configure Matlab and Brainstorm to connect to this Python environment.
For GUI users who are not very familiar with terminals and command-line operations, setting-up a Python environment with MNE-Python working might be a bit of challenge. The programs involved here are subject to frequent changes, we will most likely need to update this page regularly. If the documentation below is incomplete or incorrect, please share your comments on the user forum so that we can improve it.
Installing Python and MNE-Python
First you need to install Python and MNE-Python package on your computer. This is done independently from MATLAB. Follow the installation instructions from the MNE-Python website:
https://www.nmr.mgh.harvard.edu/mne/stable/install_mne_python.html
Configuration in Brainstorm
In an ideal configuration, your Python environment is automatically detected and configured by Matlab, and you can use any process using MNE-Python in Brainstorm without any additional configuration. This might be the case on Linux or MacOS, but Windows computers always require some manual setup. The first time you call a process using MNE-Python, if the software is not found automatically, Brainstorm would guide you through the configuration.
Locate the Python executable
asks you where is your Python executable located on your hard drive, and
pyversion