Skip to content

Coregistration GUI modernisation (phase 4) - #14285

Merged
larsoner merged 7 commits into
mne-tools:mainfrom
payamsash:coreg_gui_dev_phase_2
Sep 10, 2026
Merged

larsoner merged 7 commits into
mne-tools:mainfrom
payamsash:coreg_gui_dev_phase_2

Conversation

@payamsash

Copy link
Copy Markdown
Member

Reference issue (if any)

following #14218 and phase 4 of #14141

What does this implement/fix?

  • Icons on coreg GUI dock buttons, reusing mne.viz.Brain's existing icon set
  • some text fixes
  • Color-coded fit-quality badge
  • mm to/from cm display-unit toggle
  • Colorblind-safe color pair

Additional information

I implemented and Claude opus 5 reviewed the changes.

@payamsash
payamsash requested a review from drammock as a code owner September 8, 2026 12:45
@larsoner

larsoner commented Sep 8, 2026

Copy link
Copy Markdown
Member

Can you give some before / after screenshots for these? It will save review time to have a visual!

Comment thread mne/gui/_coreg.py Outdated
Comment on lines +86 to +90
return "Good", "#2e7d32"
elif mean_dist <= 10.0:
return "Fair", "#e69f00"
else:
return "Poor", "#d55e00"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline comments naming the colors (approximately) would be nice here so I don't have to do the hex gymnastics myself. Or even better if there are named matplotlib colors you could just use them instead of hex

Comment thread mne/gui/_coreg.py
_HSP_INSIDE_COLOR = (0.8, 0.4, 0.0)


def _convert_distance(value, from_unit, to_unit):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like the sort of helper we must have somewhere else... did you check? If not, can you?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have mne/transforms.py::angle_distance_between_rigid and mne/utils/check.py but both support "m" / "mm", not "cm". I think "cm" isn't used elsewhere.

@payamsash
payamsash requested a review from agramfort as a code owner September 9, 2026 06:03
@payamsash

Copy link
Copy Markdown
Member Author

before:

before

after:

after

@larsoner

larsoner commented Sep 9, 2026

Copy link
Copy Markdown
Member

For the head<->MRI transform there are two identical-looking icons now. It would be good to keep the Save and Load text visible to know immediately what they mean

@larsoner
larsoner merged commit fcdab87 into mne-tools:main Sep 10, 2026
26 checks passed
@larsoner

Copy link
Copy Markdown
Member

Thanks @payamsash !

larsoner added a commit to ualsbombe/mne-python that referenced this pull request Sep 10, 2026
…rain_signed

* upstream/main: (251 commits)
  Coregistration GUI modernisation (phase 4) (mne-tools#14285)
  Dipole GUI interactivity and visual enhancements (phase 2) (mne-tools#14291)
  Width [circle deploy] [skip azp] [skip actions]
  Post-release deprecations (mne-tools#14290)
  FIX: Come on [circle deploy] [skip azp] [skip actions]
  PyVista try again [circle deploy] [skip azp] [skip actions]
  FIX: PyVista [circle deploy] [skip azp] [skip actions]
  FIX: Really [circle deploy] [skip azp] [skip actions]
  FIX: Doc
  Release commit [circle deploy]
  MAINT: Update code credit (mne-tools#14289)
  MAINT: Update pre-commit hook versions (mne-tools#14288)
  BUG: use fixed normalized CTPS cutoff for automatic ECG detection (mne-tools#14279)
  Move toward docstacks [circle deploy] [skip azp] [skip actions]
  Fix tfce (mne-tools#14286)
  FIX: Improve channel name rendering in `plot_alignment` (mne-tools#13773)
  Don't shift placeholder proc_history dates in anonymize_info (mne-tools#14248)
  MRG: Avoid pytest 10 warnings in sklearn estimator checks (mne-tools#14283)
  MAINT: Update pre-commit hook versions (mne-tools#14282)
  DOC: Add osl-dynamics to related software list (mne-tools#14268)
  ...
larsoner added a commit to drammock/mne-python that referenced this pull request Sep 11, 2026
* upstream/main: (75 commits)
  Brain GUI modernization (Phase 7) (mne-tools#14270)
  Fix bug with SciPy 1.18.0 EEGLAB reading (mne-tools#14293)
  remove plotting abs as the defauls for plotting volumetric (mne-tools#13989)
  Coregistration GUI modernisation (phase 4) (mne-tools#14285)
  Dipole GUI interactivity and visual enhancements (phase 2) (mne-tools#14291)
  Width [circle deploy] [skip azp] [skip actions]
  Post-release deprecations (mne-tools#14290)
  FIX: Come on [circle deploy] [skip azp] [skip actions]
  PyVista try again [circle deploy] [skip azp] [skip actions]
  FIX: PyVista [circle deploy] [skip azp] [skip actions]
  FIX: Really [circle deploy] [skip azp] [skip actions]
  FIX: Doc
  Release commit [circle deploy]
  MAINT: Update code credit (mne-tools#14289)
  MAINT: Update pre-commit hook versions (mne-tools#14288)
  BUG: use fixed normalized CTPS cutoff for automatic ECG detection (mne-tools#14279)
  Move toward docstacks [circle deploy] [skip azp] [skip actions]
  Fix tfce (mne-tools#14286)
  FIX: Improve channel name rendering in `plot_alignment` (mne-tools#13773)
  Don't shift placeholder proc_history dates in anonymize_info (mne-tools#14248)
  ...

# Conflicts:
#	mne/io/edf/tests/test_edf.py
larsoner added a commit to natinew77-creator/mne-python that referenced this pull request Sep 11, 2026
* upstream/main: (22 commits)
  fix EDF round-trip (mne-tools#14296)
  Brain GUI modernization (Phase 7) (mne-tools#14270)
  Fix bug with SciPy 1.18.0 EEGLAB reading (mne-tools#14293)
  remove plotting abs as the defauls for plotting volumetric (mne-tools#13989)
  Coregistration GUI modernisation (phase 4) (mne-tools#14285)
  Dipole GUI interactivity and visual enhancements (phase 2) (mne-tools#14291)
  Width [circle deploy] [skip azp] [skip actions]
  Post-release deprecations (mne-tools#14290)
  FIX: Come on [circle deploy] [skip azp] [skip actions]
  PyVista try again [circle deploy] [skip azp] [skip actions]
  FIX: PyVista [circle deploy] [skip azp] [skip actions]
  FIX: Really [circle deploy] [skip azp] [skip actions]
  FIX: Doc
  Release commit [circle deploy]
  MAINT: Update code credit (mne-tools#14289)
  MAINT: Update pre-commit hook versions (mne-tools#14288)
  BUG: use fixed normalized CTPS cutoff for automatic ECG detection (mne-tools#14279)
  Move toward docstacks [circle deploy] [skip azp] [skip actions]
  Fix tfce (mne-tools#14286)
  FIX: Improve channel name rendering in `plot_alignment` (mne-tools#13773)
  ...

# Conflicts:
#	mne/viz/backends/tests/test_renderer.py
larsoner added a commit to natinew77-creator/mne-python that referenced this pull request Sep 11, 2026
* upstream/main: (25 commits)
  ENH: add the JupyterLite notebook setup cell (JupyterLite split 4/5) (mne-tools#14150)
  FIX: Ver [circle deploy] [skip azp] [skip actions]
  Hotfix
  fix EDF round-trip (mne-tools#14296)
  Brain GUI modernization (Phase 7) (mne-tools#14270)
  Fix bug with SciPy 1.18.0 EEGLAB reading (mne-tools#14293)
  remove plotting abs as the defauls for plotting volumetric (mne-tools#13989)
  Coregistration GUI modernisation (phase 4) (mne-tools#14285)
  Dipole GUI interactivity and visual enhancements (phase 2) (mne-tools#14291)
  Width [circle deploy] [skip azp] [skip actions]
  Post-release deprecations (mne-tools#14290)
  FIX: Come on [circle deploy] [skip azp] [skip actions]
  PyVista try again [circle deploy] [skip azp] [skip actions]
  FIX: PyVista [circle deploy] [skip azp] [skip actions]
  FIX: Really [circle deploy] [skip azp] [skip actions]
  FIX: Doc
  Release commit [circle deploy]
  MAINT: Update code credit (mne-tools#14289)
  MAINT: Update pre-commit hook versions (mne-tools#14288)
  BUG: use fixed normalized CTPS cutoff for automatic ECG detection (mne-tools#14279)
  ...
larsoner added a commit to wmvanvliet/mne-python that referenced this pull request Sep 16, 2026
…d-sphere

* commit '0311e444b0450ce9d2b2b304cebe7d5343533357':
  Fix static doc viewing in IDEs (mne-tools#14195)
  Fix COLA for odd sizes (mne-tools#14312)
  add type hints to mne/_fiff/ module (mne-tools#14278)
  ENH: wire the JupyterLite build into the docs (JupyterLite split 5/5) (mne-tools#14157)
  MAINT: Update pre-commit hook versions (mne-tools#14306)
  Small documentation fix for "Frequency and time-frequency sensor analysis" tutorial (mne-tools#14304)
  FIX: don't mutate cached ICA sources in plot_sources properties (mne-tools#14303)
  Fix bug with lite backend closing (mne-tools#14302)
  Fix for NumPy eig change [circle deploy] (mne-tools#14300)
  No PyQt5 [circle deploy] [skip azp] [skip actions]
  ENH: add the JupyterLite notebook setup cell (JupyterLite split 4/5) (mne-tools#14150)
  FIX: Ver [circle deploy] [skip azp] [skip actions]
  Hotfix
  fix EDF round-trip (mne-tools#14296)
  Brain GUI modernization (Phase 7) (mne-tools#14270)
  Fix bug with SciPy 1.18.0 EEGLAB reading (mne-tools#14293)
  remove plotting abs as the defauls for plotting volumetric (mne-tools#13989)
  Coregistration GUI modernisation (phase 4) (mne-tools#14285)
  Dipole GUI interactivity and visual enhancements (phase 2) (mne-tools#14291)
larsoner added a commit to CarinaFo/mne-python that referenced this pull request Sep 16, 2026
* upstream/main: (91 commits)
  Fix static doc viewing in IDEs (mne-tools#14195)
  Fix COLA for odd sizes (mne-tools#14312)
  add type hints to mne/_fiff/ module (mne-tools#14278)
  ENH: wire the JupyterLite build into the docs (JupyterLite split 5/5) (mne-tools#14157)
  MAINT: Update pre-commit hook versions (mne-tools#14306)
  Small documentation fix for "Frequency and time-frequency sensor analysis" tutorial (mne-tools#14304)
  FIX: don't mutate cached ICA sources in plot_sources properties (mne-tools#14303)
  Fix bug with lite backend closing (mne-tools#14302)
  Fix for NumPy eig change [circle deploy] (mne-tools#14300)
  No PyQt5 [circle deploy] [skip azp] [skip actions]
  ENH: add the JupyterLite notebook setup cell (JupyterLite split 4/5) (mne-tools#14150)
  FIX: Ver [circle deploy] [skip azp] [skip actions]
  Hotfix
  fix EDF round-trip (mne-tools#14296)
  Brain GUI modernization (Phase 7) (mne-tools#14270)
  Fix bug with SciPy 1.18.0 EEGLAB reading (mne-tools#14293)
  remove plotting abs as the defauls for plotting volumetric (mne-tools#13989)
  Coregistration GUI modernisation (phase 4) (mne-tools#14285)
  Dipole GUI interactivity and visual enhancements (phase 2) (mne-tools#14291)
  Width [circle deploy] [skip azp] [skip actions]
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants