-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ENH: new coreg gui features (part 2) #10085
ENH: new coreg gui features (part 2) #10085
Conversation
Looking forward to this now that #10015 is in! |
Assuming that your issue is related to |
Looks nice! One comment is that when ICP runs, the distances are now shown in two places: in the fitting pane, and another in the status bar: In general, people should ideally have one place they can always look for any given type of information. For distances in particular, I'd keep it all in the right "Fitting" bar. Then the status bar can just show stuff about the number of iterations, and then at the end how many iterations were done and how long it took. Same thing would then goes for "Fitting ICP - Iteration N". This shows up in the 3D plot, but would now be better just in the status bar. In other words:
I'd prefer actually that whatever the last message was just stays put. I don't see much advantage to removing the last status message displayed. It's even helpful to have it stay forever in some cases to remind people what the last thing they did was! |
... also when running at some point I got:
|
idem
❯ mne coreg -s sample -d ~/mne_data/MNE-sample-data/subjects
--interaction=trackball -f
~/mne_data/MNE-sample-data/MEG/sample/sample_audvis_raw.fif
Traceback (most recent call last):
File "/Users/alex/work/src/mne-python/mne/gui/_coreg.py", line 865, in
_fit_icp
self._last_log +
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Fatal Python error: Aborted
Current thread 0x000000010b34cdc0 (most recent call first):
File "/Users/alex/work/src/mne-python/mne/viz/backends/_utils.py", line
163 in _qt_app_exec
File "/Users/alex/work/src/mne-python/mne/gui/_coreg.py", line 252 in
__init__
File "<decorator-gen-549>", line 24 in __init__
File "/Users/alex/work/src/mne-python/mne/gui/__init__.py", line 192 in
coregistration
File "<decorator-gen-537>", line 24 in coregistration
File "/Users/alex/work/src/mne-python/mne/commands/mne_coreg.py", line 89
in run
File "/Users/alex/work/src/mne-python/mne/commands/utils.py", line 107 in
main
File "/Users/alex/miniconda3/bin/mne", line 33 in <module>
[1] 15062 abort mne coreg -s sample -d
~/mne_data/MNE-sample-data/subjects -f
… |
what about now @larsoner, @agramfort ? |
I changed it back to WIP because @agramfort found 2 bugs:
|
I do not have this behaviour on my linux and I checked that I will start by looking into 2). |
I added a few calls to I tried 2d4b4b7 for MacOS based on what is used on |
371b86a is my latest attempt at fixing 1) on MacOS |
Okay, it's better than I thought. So @agramfort, in order to move forward with this one, I can report that there could be a delay with updating the distances on MacOS on #8833 I was able to check that the status bar and the render view are updated correctly so it's ready to go on my side. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of small tweaks / ideas we can keep in mind moving forward. Works great so I'll merge, thanks @GuillaumeFavelier !
@@ -1963,3 +1969,57 @@ def reset(self): | |||
self._extra_points_filter = None | |||
self._update_nearest_calc() | |||
return self | |||
|
|||
def _get_fiducials_distance(self): | |||
distance = OrderedDict() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer need OrderedDict
because we are 3.7+. I think our existing ones are mostly there for cruft reasons
if not self._lock_fids: | ||
self._display_message( | ||
"Fitting is disabled, lock the fiducials first.") | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future we should properly disable in a UI way (button.setEnabled(False) in Qt parlance for example) the things that people are not supposed to use
This PR is based on #10015 and adds the following:
It's part of #8833
Can only be merged after #10015