mne-tools / mne-tools/mne-python

ENH topomap validation and bad channels

Open
#5,735 3 comments 1 reaction 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

When using mne to plot topomaps computed with some external methods, it highlights a channel that appears to be "bad", in the sense that the topomap is discontinuous:

image

Here is a snippet reproducing this topomap with files from numpy_files.zip:

import numpy as np
import mne

pos = np.load("pos.npy")
u_hat = np.load("spatial_map.npy")

mne.viz.plot_topomap(u_hat, pos)

I would be interested in having a utility function returning the spatial regularity of a topomap and the potential bad channels. And I think it would be better in mne as you need to correctly parse the position of each sensor to compute the spatial differential.

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 with the issue's reproducer using pos.npy, spatial_map.npy, and mne.viz.plot_topomap. Read the topomap visualization entry point and determine how sensor positions are parsed. Done should include a decided utility API that measures spatial regularity and identifies potential bad channels, with coverage for the supplied example.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.