mne-tools / mne-tools/mne-python

GSoC 2026: Event System meta issue

Open
#13,927 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.5k
Forks
1.6k
Avg merge
1d 6h
Merged PRs (30d)
100

Description

Introduction

This meta issue holds a dynamic log of planned and ongoing tasks around enhancing the event system in MNE.
It is also the Working Product Report for Google Summer of Code 2026.

Details

GSoC Contributor: Lifeng Qiu Lin
Main Supervisor/Mentor: Marijn van Vliet
Organisation: Python Software Foundation - MNE-Python
Project Title: Implement and Improve Bidirectional Event System across MNE plots

Description

The event system allows property transfer between plots dynamically, even from different sources in MNE. The existing architecture is well-structured; however, the integration of the events in plots is not complete. This project emerged as an idea to implement new and appropriate behaviours in diverse kinds of plots, including in future GUIs like the dipole-fitting system, to handle events.

In the end, we expect to see plots interacting in real time when toggling one of them, providing accurate cues in all others after one selection.

Issues solved and PRs implemented

Main Code Contributions
  • #13924
    • Main changes:
      • Fix misaligned channels in multiple Evoked instances that are treated as aligned bug
      • Fix the non-default-ordering channels placed wrongly as the default ones bug
    • PR: #13943
  • #13928
    • Main changes:
      • Enhance plot_evoked_topo with TimeChange behaviour - vertical bar
      • Enhance plot_evoked_topo main and subfigures, both react to TimeChange and is able to publish
      • Enhance ui_events.link, allow recursive option to link the groups the figures belong to too
      • API change in mne.viz.iter_topography, the on_pick callable accepts new parameter orig_fig that refers to the main figure
    • PR: #13968
  • #14024
    • Main changes:
      • Fix in mne.viz.plot_evoked, spatial_colors is not "auto" by default, as described by docs or like mne.Evoked.plot
      • Fix the empty topo map bug when clicking after time range selection in plot_evoked
      • Enhance plot_evoked with TimeChange behaviour - vertical bar, able to subscribe and publish TimeChange event
      • Refactor mne.viz.plot_ica_sources when passing Evoked instance, streamline and plug into existing functions, removing tech debt
      • Enhance the ICA source plot to have the same hover, clicking, event functionalities like plot_evoked
    • PR: #14025
  • #14094
    • Main changes:
      • Enhance ‎mne/viz/_brain/_brain.py Brain plotting to carry source_id parameter in VertexSelect event
      • Document the convenience of using the nearest source point in a dipole visualisation through a tutorial example
    • PRs:
      • #14126
      • #14154
      • #14169
  • https://github.com/mne-tools/mne-python/issues/11977
    • Continuation of existing PR: https://github.com/mne-tools/mne-python/pull/13074
    • Main changes:
      • Fix mne/gui/tests/test_dipolefit.py - DipoleFitUI class ChannelsSelection problem when sensors didn't change colour according to user selection
      • Enhance the logic of cloud and actors from mne/viz/_3d.py to record channels from upstream; now each cloud iterates through channel types and coils
      • Enhance the ChannelsSelection to be propagated to outer main figure links when retrieved by subfigures
    • PR: https://github.com/wmvanvliet/mne-python/pull/25
Issues participated:
  • #13956
  • #14032
  • #14038
Note
  • Not all code logic is commented here for length reasons; see each PR for details
  • All new functions come with their respective tests, even when they are not explicitly written in the changelog
  • Documentation is provided for each PR, also provided inside the framework in variable length, depending on the scope

Lessons and challenges

Along the way, I faced many challenges and learnt a lot of lessons as a result. I hope sharing them would help future contributors who want to get involved in MNE, or simply another read for one's programming experience.

  • One big problem I faced at the beginning was understanding the main pipelines in the framework, as anyone starting on a new code base. In this case, tutorials on the MNE website, the search function, and starting by fixing a small bug, these are things that help a lot.
  • One lesson I learnt is to continue implementing the solution until you face a behavioural decision. One could wait for guidance there at early stages, while after getting used to it, choose to proceed with one of the options, and then explain later to the mentor to agree or discard the design (with justification).
  • Another interesting challenge is how tangled the calls and variables are in some of the classes or functions, especially the plotting ones, which require lots of decorating. There is no excellent solution to this, but get used to the naming convention (ask if unsure), and try to trace back through the lines and calls.
  • Finally, mentor usually has the expertise to know what you are looking for or where to look for a certain thing, which can save a lot of time when you are unfamiliar, but you should carefully weigh the effort and time needed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the unchecked #11977 and its continuation in PR #13074, then read mne/gui/tests/test_dipolefit.py and the event-related logic in mne/viz/_3d.py. Compare the existing completed issues and PRs listed here before choosing a scoped task. Done means the remaining dipole-fit event propagation works correctly and its tests and documentation are updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.