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

XFit-style dipole fitting GUI #13074

Draft
wants to merge 111 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
752854d
Add EvokedField.plotter
wmvanvliet Sep 20, 2023
d9b2e07
Merge branch 'main' of github.com:mne-tools/mne-python
wmvanvliet Sep 27, 2023
55edc31
Merge branch 'main' of github.com:mne-tools/mne-python
wmvanvliet Oct 2, 2023
bb7e229
Merge branch 'main' of github.com:mne-tools/mne-python
wmvanvliet Oct 4, 2023
1178ebc
BUG: Fix bug with sensor_colors
larsoner Oct 4, 2023
7556823
Update devel.rst
larsoner Oct 4, 2023
cb5a520
Add foreground/background parameters to EvokedField plot
wmvanvliet Oct 4, 2023
d4015d4
Set foreground automatically
wmvanvliet Oct 4, 2023
2c307fe
First working version of lasso select in plot_evoked_topo
wmvanvliet Oct 4, 2023
3b37ea3
Add slider to control contour line thickness
wmvanvliet Oct 4, 2023
6245c0a
Merge branch 'main' into evoked-field-colors
wmvanvliet Oct 4, 2023
4f43e50
Merge branch 'colors' into xfit
wmvanvliet Oct 4, 2023
9779843
Merge branch 'evoked-field-colors' into xfit
wmvanvliet Oct 4, 2023
9747338
Merge branch 'sensorselect' into xfit
wmvanvliet Oct 4, 2023
8268315
fix
wmvanvliet Oct 5, 2023
7dd77d9
Some initial stuff
wmvanvliet Oct 6, 2023
10c2b2a
Merge branch 'main' into xfit
wmvanvliet Oct 13, 2023
f0a92da
Merge branch 'main' of github.com:mne-tools/mne-python into xfit
wmvanvliet Oct 13, 2023
8ef1179
Small steps
wmvanvliet Oct 18, 2023
ca46e1a
Merge remote-tracking branch 'upstream/main' into xfit
wmvanvliet Oct 18, 2023
458c509
Continue work on the "fit dipole" button
wmvanvliet Oct 19, 2023
3c91d05
More progress
wmvanvliet Oct 31, 2023
6d2496c
Merge branch 'main' into xfit
wmvanvliet Nov 4, 2023
8fc904d
Merge branch 'main' of github.com:mne-tools/mne-python into xfit
wmvanvliet Nov 11, 2023
6170c63
Merge branch 'main' of github.com:mne-tools/mne-python into sensorselect
wmvanvliet Nov 11, 2023
41087bb
Fix divide by zero
wmvanvliet Nov 14, 2023
568560b
Fix sensor picking
wmvanvliet Nov 14, 2023
f6738e7
Fix bug
wmvanvliet Nov 14, 2023
a83b8fd
Fix more renames
wmvanvliet Nov 14, 2023
3bfe2a5
Don't draw patches for channels that do not exist
wmvanvliet Nov 14, 2023
2e94752
Move the ChannelsSelect ui-event one abstraction layer higher
wmvanvliet Nov 14, 2023
3c6b73c
Some more fixes
wmvanvliet Nov 14, 2023
9b6bd60
select_many should not notify()
wmvanvliet Nov 14, 2023
8796836
Merge branch 'main' into sensorselect
wmvanvliet Nov 14, 2023
573cb40
Add "select" parameter to enable/disable the lasso selection tool
wmvanvliet Nov 14, 2023
facd394
Add select parameter to relevant methods
wmvanvliet Nov 14, 2023
a0069d8
Update test
wmvanvliet Nov 15, 2023
76aebb3
Merge branch 'sensorselect' into xfit
wmvanvliet Nov 27, 2023
1cbdb96
Merge branch 'main' into xfit
wmvanvliet Dec 11, 2023
b0e6cb2
Enable sensor selection again
wmvanvliet Dec 11, 2023
474f184
Merge branch 'main' of github.com:mne-tools/mne-python into xfit
wmvanvliet Dec 18, 2023
bc54c3a
Merge branch 'main' into xfit
wmvanvliet Apr 19, 2024
aa25982
Merge branch 'main' into xfit
wmvanvliet May 17, 2024
bb4fd2c
Implement toggling fixed orientation with MNE solution
wmvanvliet May 17, 2024
b498c15
small fixes
wmvanvliet Jun 4, 2024
c2eed61
Merge branch 'xfit' of github.com:wmvanvliet/mne-python into xfit
wmvanvliet Jun 4, 2024
f7005a5
Merge branch 'main' into xfit
wmvanvliet Jun 7, 2024
b47792e
Merge branch 'xfit' of github.com:wmvanvliet/mne-python into xfit
wmvanvliet Jun 7, 2024
fda59e8
Merge branch 'main' into xfit
wmvanvliet Jul 12, 2024
ca1b99e
Remove features not for v1
wmvanvliet Jul 14, 2024
1b877df
Work more on xfit
wmvanvliet Jul 18, 2024
f7bd8cc
Fixes
wmvanvliet Jul 18, 2024
5f594dd
more fixes
wmvanvliet Jul 19, 2024
263b99f
Merge branch 'main' into xfit
wmvanvliet Jul 22, 2024
eaa081e
fix multi-dipole model
wmvanvliet Jul 24, 2024
ffb2fe1
Add save option
wmvanvliet Jul 24, 2024
2f801a4
style tweaks
wmvanvliet Jul 24, 2024
56ebda7
Merge branch 'main' into sensorselect
wmvanvliet Jul 24, 2024
d913fff
fix bugs (thanks vulture!)
wmvanvliet Jul 24, 2024
13877b4
Add rank parameter
wmvanvliet Jul 29, 2024
74e80d6
Merge branch 'xfit' of github.com:wmvanvliet/mne-python into xfit
wmvanvliet Jul 29, 2024
4039603
Merge branch 'main' into xfit
wmvanvliet Jul 29, 2024
43e145f
Merge branch 'main' into xfit
wmvanvliet Aug 9, 2024
b2bdbe2
Merge branch 'xfit' of github.com:wmvanvliet/mne-python into xfit
wmvanvliet Aug 9, 2024
e342e43
start work on dipole deletion
wmvanvliet Aug 21, 2024
5c8e337
Merge branch 'main' into xfit
wmvanvliet Oct 2, 2024
5bdb9e1
Finish dipole deletion, add occlusion mesh
wmvanvliet Oct 2, 2024
2aa51d6
set rank
wmvanvliet Oct 8, 2024
65fb86b
Merge branch 'main' of github.com:mne-tools/mne-python into sensorselect
wmvanvliet Oct 8, 2024
9b6b06a
Merge branch 'sensorselect' of github.com:wmvanvliet/mne-python into …
wmvanvliet Oct 8, 2024
bcef66e
attempt to fix tests
wmvanvliet Oct 8, 2024
8efcb8c
further attempts to fix tests
wmvanvliet Oct 22, 2024
87f72e2
Add what's new entry
wmvanvliet Oct 22, 2024
6601235
Merge branch 'main' into sensorselect
wmvanvliet Oct 22, 2024
871e15a
Merge branch 'sensorselect' of github.com:wmvanvliet/mne-python into …
wmvanvliet Oct 22, 2024
8ebd885
Merge branch 'main' into xfit
wmvanvliet Nov 15, 2024
5f5666a
also show field strength input fields when not plotting density
wmvanvliet Jan 7, 2025
0277981
Update unit tests for lasso select
wmvanvliet Jan 7, 2025
bea101d
Update unit tests for lasso select
wmvanvliet Jan 7, 2025
2ae07bf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 7, 2025
f55028d
Merge branch 'main' into sensorselect
wmvanvliet Jan 20, 2025
49c9d0b
Merge branch 'sensorselect' of github.com:wmvanvliet/mne-python into …
wmvanvliet Jan 20, 2025
e857a2e
Move large lasso test to test_utils.py and have smaller tests in test…
wmvanvliet Jan 20, 2025
822f761
select from proper list of channels
wmvanvliet Jan 20, 2025
51efe6c
fix version
wmvanvliet Jan 20, 2025
e806634
more versionadded annotations
wmvanvliet Jan 20, 2025
23b5c23
Merge branch 'sensorselect' into xfit
wmvanvliet Jan 20, 2025
8b1a014
Save and load dipoles Xfit style. Fix legend when hiding dipoles.
wmvanvliet Jan 21, 2025
0066f0b
cleanup
wmvanvliet Jan 21, 2025
f1a0364
more cleanup
wmvanvliet Jan 21, 2025
727fa29
Fix single dipole fitting with loose orientation
wmvanvliet Jan 21, 2025
710b77d
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 21, 2025
4b71df0
fixes proposed by vulture
wmvanvliet Jan 21, 2025
dbabf05
Properly implement and test single channel picking
wmvanvliet Jan 22, 2025
e90887d
Add logging message
wmvanvliet Jan 22, 2025
df0737f
Merge branch 'sensorselect' into xfit
wmvanvliet Jan 22, 2025
1e67acc
Merge branch 'xfit' of github.com:wmvanvliet/mne-python into xfit
wmvanvliet Jan 22, 2025
622ff54
small fix
wmvanvliet Jan 22, 2025
64b0ed1
Merge branch 'main' into xfit
wmvanvliet Jan 22, 2025
0841c88
Merge branch 'main' into xfit
wmvanvliet Jan 24, 2025
0f3239a
Merge branch 'xfit' of github.com:wmvanvliet/mne-python into xfit
wmvanvliet Jan 24, 2025
17e28b0
Merge branch 'main' into xfit
wmvanvliet Jan 26, 2025
b4467c9
Merge branch 'main' into xfit
wmvanvliet Jan 29, 2025
d878f60
fix to dipole
wmvanvliet Jan 31, 2025
b1ee63a
Add possibility to show an stc with the fieldmap
wmvanvliet Feb 4, 2025
15519eb
Take units (m or mm) into account when showing fieldmaps on top of br…
wmvanvliet Feb 4, 2025
5108607
Add unit test and towncrier
wmvanvliet Feb 4, 2025
e243310
Don't make unnecessary copy
wmvanvliet Feb 4, 2025
a1f5328
Fix
wmvanvliet Feb 4, 2025
4e7270a
Merge branch 'evoked-field-units' into xfit
wmvanvliet Feb 4, 2025
c703e32
some checks on inputs and doc
wmvanvliet Feb 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changes/devel/13101.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Take units (m or mm) into account when drawing :func:`~mne.viz.plot_evoked_field` on top of :class:`~mne.viz.Brain`, by `Marijn van Vliet`_.
4 changes: 2 additions & 2 deletions mne/dipole.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ def _write_dipole_bdip(fname, dip):
fid.write(np.array(has_errors, ">i4").tobytes()) # has_errors
fid.write(np.zeros(1, ">f4").tobytes()) # noise level
for key in _BDIP_ERROR_KEYS:
val = dip.conf[key][ti] if key in dip.conf else 0.0
val = dip.conf[key][ti] if key in dip.conf else np.array(0.0)
assert val.shape == ()
fid.write(np.array(val, ">f4").tobytes())
fid.write(np.zeros(25, ">f4").tobytes())
Expand Down Expand Up @@ -1503,7 +1503,7 @@ def fit_dipole(
if not bem["is_sphere"]:
# Find the best-fitting sphere
inner_skull = _bem_find_surface(bem, "inner_skull")
inner_skull = inner_skull.copy()
inner_skull = deepcopy(inner_skull)
R, r0 = _fit_sphere(inner_skull["rr"], disp=False)
# r0 back to head frame for logging
r0 = apply_trans(mri_head_t["trans"], r0[np.newaxis, :])[0]
Expand Down
3 changes: 2 additions & 1 deletion mne/gui/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
__all__ = ["_GUIScraper", "coregistration"]
__all__ = ["_GUIScraper", "coregistration", "DipoleFitUI"]
from ._gui import _GUIScraper, coregistration
from ._xfit import DipoleFitUI
Loading
Loading