Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a dipole fitting GUI that is better than XFit #11977

Open
20 of 30 tasks
wmvanvliet opened this issue Sep 9, 2023 · 2 comments
Open
20 of 30 tasks

Create a dipole fitting GUI that is better than XFit #11977

wmvanvliet opened this issue Sep 9, 2023 · 2 comments
Assignees
Labels
Milestone

Comments

@wmvanvliet
Copy link
Contributor

wmvanvliet commented Sep 9, 2023

Describe the new feature or enhancement

Starting an issue to discuss our dream dipole fitting interface. MEGIN's Xfit program has reigned supreme for what seems like forever, but that doesn't mean it's perfect.

Use cases for Xfit (feel free to add your own). Indented ones are things we can do that Xfit can not:

3D Viewer

  • View magnetic field patterns for evokeds. Scroll through time. (Interactive version of plot_evoked_fieldmap #11942)
  • View head-in-helmet alignment (plot_alignment and Brain.add_head)
    • Plot the brain and reconstructed head surface (verifying MRI alignment)
    • Plot MNE source activity to guide dipole modelling
  • See magnetic field patterns produced by selected subset of sensors only

Evoked topo plot

Dipole fitting algorithm

  • When computing dipole timecourses, select between single-dipole or multi-dipole modeling
  • Select whether fitted dipoles are allowed to rotate in time or not
  • Use freesurfer-based BEM model
  • Use sphere BEM model
  • Select noise-cov or use "standard" one
  • Compute signal explained by fitted dipoles on top of the sensor-level signals

Dipole fitting UI features

  • Fit dipole with the click of a button
  • See dipole projected on the helmet as an arrow
  • See dipole as an arrow in the brain
  • See dipole timecourse
    • See dipole timecourse for multiple evokeds (e.g. multiple conditions)
  • Select subset of sensors and fit dipole with only those sensors
  • Fit more than one dipole (https://mne.tools/stable/auto_examples/inverse/multi_dipole_model.html)
  • Save fitted dipoles to file
    • Load fitted dipoles from file
  • See percentage of signal variance explained by fitted dipoles
  • Turn dipoles on and off
    • Delete dipoles from the UI
  • Toggle removing computed signal from the evokeds (Xfit called this the "complement")

Describe your proposed implementation

Use UI event system to tie together existing plotting functions. Enhance existing plotting functions to allow for more interactivity. Finally, create complete GUI with all these pieces.

Describe possible alternatives

Stick with Xfit. Possibly the GUI could be a separate package (mne-xfit?)

Additional context

No response

@wmvanvliet wmvanvliet added the ENH label Sep 9, 2023
@larsoner larsoner added this to the 1.6 milestone Sep 11, 2023
@larsoner
Copy link
Member

We should consider also how many of these we can fix at the same time (maybe zero but hopefully more than that):

@larsoner larsoner modified the milestones: 1.6, 1.7 Nov 7, 2023
@larsoner larsoner modified the milestones: 1.7, 1.8 Apr 9, 2024
@larsoner
Copy link
Member

@wmvanvliet clearing the milestone on this one but feel free to put it to 1.9 if you think you'll have time in the next release cycle

@larsoner larsoner modified the milestones: 1.8, 1.9 Jul 15, 2024
@larsoner larsoner modified the milestones: 1.9, 1.10 Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants