Skip to content

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

Open
@wmvanvliet

Description

@wmvanvliet

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions