This page describes some of the major medium- to long-term goals for MNE-Python. These are goals that require substantial effort and/or API design considerations. Some of these may be suitable for Google Summer of Code projects, while others require more extensive work.
The current clustering statistics code has limited functionality. It should be
re-worked to create a new
cluster_based_statistic or similar function.
In particular, the new API should:
Support mixed within- and between-subjects designs, different statistical functions, etc. This should be done via a
designargument that mirrors
patsy.dmatrices()or similar community standard (e.g., this is what is used by
Have clear tutorials showing how different contrasts can be done (toy data).
Have clear tutorials showing some common analyses on real data (time-freq, sensor space, source space, etc.)
Not introduce any significant speed penalty (e.g., < 10% slower) compared to the existing, more specialized/limited functions.
More details are in gh-4859.
Historically we have used Mayavi for 3D visualization, but have faced limitations and challenges with it. We should work to use some other backend (e.g., PyVista) to get major improvements, such as:
Proper notebook support (through vtkjs)
Better interactivity with surface plots
Time-frequency plotting (complementary to volume-based Time-frequency visualization)
Integration of multiple functions as done in
mne_analyze, e.g., simultaneous source estimate viewing, field map viewing, head surface display, etc. These are all currently available in separate functions, but we should be able to combine them in a single plot as well.
One such issue for tracking TODO lists for surface plotting is gh-7162.
Our 2D code has a lot of useful functionality, but suffers from several systemic problems:
It was written by many people for many specific use cases over time, without ensuring that code was generalized. This means that some functions are available only in some plotting modes (e.g., grouping by channel types to obtain a butterfly plot can be done in
The code base has many redundant but not identical pieces of code (copy-paste-modify rather than generalize-reuse / DRY) that make maintenance particularly challenging.
By (extensively) refactoring our code, we would improve the end-user experience and decrease long-term maintenance costs.
We should implement a viewer for interactive visualization of volumetric source-time-frequency (5-D) maps on MRI slices (orthogonal 2D viewer). NutmegTrip (written by Sarang Dalal) provides similar functionality in Matlab in conjunction with FieldTrip. Example of NutmegTrip’s source-time-frequency mode in action (click for link to YouTube):
Currently, cloud computing with M/EEG data requires multiple manual steps, including remote environment setup, data transfer, monitoring of remote jobs, and retrieval of output data/results. These steps are usually not specific to the analysis of interest, and thus should be something that can be taken care of by MNE. Subgoals consist of:
Leverage dask and joblib or other libs to allow simple integration with MNE processing steps. Ideally this would be achieved in practice by:
One-time (or per-project) setup steps, setting up host keys, access tokens, etc.
In code, switch to cloud computing rather than local computing via a simple change of n_jobs parameter, and/or context manager like with:
with use_dask(...): ...
Develop a (short as possible) example that shows people how to run a minimal task remotely, including setting up access, cluster, nodes, etc.
Adapt MNE-study-template code to use cloud computing (optionally, based on config) rather than local resources.
We want our tutorials to get users up to speed on:
How to do M/EEG analyses in principle, and
How to do M/EEG analyses in MNE-Python in particular
So far some of our tutorials have been rewritten, but we still have a long way to go. Relevant tracking issues can be found under the tag gh-labels/DOC.
mne coreg is an excellent tool for coregistration, but is limited by being tied to Mayavi, Traits, and TraitsUI. We should first refactor in several (mostly) separable steps:
Refactor code to use traitlets
GUI elements to use PyQt5 (rather than TraitsUI/pyface)
3D plotting to use our abstracted 3D viz functions rather than Mayavi
Refactor distance/fitting classes to public ones to enable the example from gh-6693.
Once this is done, we can effectively switch to a PyVista backend.
MNE-Python should facilitate analyzing BIDS-compliant datasets thanks to integration with the MNE-BIDS package. For more information, see https://github.com/mne-tools/mne-bids.
We should improve the access to open EEG/MEG databases via the
mne.datasets module, in other words improve our dataset fetchers.
We have physionet, but much more. Having a consistent API to access multiple
data sources would be great. See gh-2852 and gh-3585 for some ideas,
as well as:
- Human Connectome Project Datasets
Over a 3-year span (2012-2015), the Human Connectome Project (HCP) scanned 1,200 healthy adult subjects. The available data includes MR structural scans, behavioral data and (on a subset of the data) resting state and/or task MEG data.
- MMN dataset
Used for tutorial/publications applying DCM for ERP analysis using SPM.
- Kymata Datasets
Current and archived EMEG measurement data, used to test hypotheses in the Kymata atlas. The participants are healthy human adults listening to the radio and/or watching films, and the data is comprised of (averaged) EEG and MEG sensor data and source current reconstructions.
A website that lists a number of MEG datasets available for download.
- BNCI Horizon
OpenMEEG is a state-of-the art solver for forward modeling in the field of brain imaging with MEG/EEG. It solves numerically partial differential equations (PDE). It is written in C++ with Python bindings written in SWIG. The ambition of the project is to integrate OpenMEEG into MNE offering to MNE the ability to solve more forward problems (cortical mapping, intracranial recordings, etc.). Some software tasks that shall be completed:
Cleanup Python bindings (remove useless functions, check memory managements, etc.)
Write example scripts for OpenMEEG that automatically generate web pages as for MNE
Understand how MNE encodes info about sensors (location, orientation, integration points etc.) and allow OpenMEEG to be used.
Help package OpenMEEG for Debian/Ubuntu
Help manage the continuous integration system