Repository navigation
MRG: Minor enhancements to coreg - #3935
Conversation
|
It also now explicitly sets the focal point to the MRI origin |
Current coverage is 85.89% (diff: 87.01%)@@ master #3935 diff @@
==========================================
Files 349 349
Lines 62113 62147 +34
Methods 0 0
Messages 0 0
Branches 9511 9513 +2
==========================================
+ Hits 53211 53383 +172
+ Misses 6233 6094 -139
- Partials 2669 2670 +1
|
|
Also now added command-line options for head opacity and low/high-resolution head |
in particular, set —low-res-head option before loading the first head
|
I'm working on this, just a quick thought: instead of exposing a lot of options (like head opacity) in the command line, could the desired outcome also be achieved by remembering between sessions what the given setting was? I.e save on quit the head transparency and reload it on initialization? |
|
@Eric89GXL Sorry, I wanted to make a PR into your PR and accidentally pushed to your branch, I added reasoning/comments to each commit message. Other than those suggestions +1 for merge. Let me know if you prefer me to roll back and make a proper PR to discuss the individual changes. |
|
Nah they look good to me. You +1 for merge, then? If so I'll merge once the CIs are happy and rebase #3937 |
|
Yes, merge when CIs are good. |
|
Your changes broke the tests for me (and will break Travis and AppVeyor) because the "No Subjects Found" blocking dialog pops up in |
|
Yeah it looks like you moved that line back up in this commit, which broke it: |
|
IIRC The reason for moving the line up was that without it, I would get a warning that there was no high res head shape for fsaverage even with The problematic dialog seems to pop up in However I noticed something else, why do we test CoregFrame at two places (end of |
|
P. S. |
Is the dialog popup supposed to be there, or no? If it's supposed to be there then we can add a skip in the code when in testing mode. If it's not supposed to be there then we should fix the code. But it sounds like you've already made it do the right thing, so a skip of blocking dialog would make sense. As for the other testing questions, I haven't worked with them much so feel free to do what makes them work well. |
|
Actually, hold on, this will not work in all cases, sorry |
|
This should work. The warning dialog only pops up if subjects_dir is set to something. |
| @@ -146,22 +153,42 @@ def test_coreg_model(): | |||
| finally: | |||
There was a problem hiding this comment.
Isn't this test above redundant? x._init_plot() should also be called below in frame.edit_traits()
There was a problem hiding this comment.
This does not display the way I wanted, I mean this test: https://github.com/Eric89GXL/mne-python/blob/tweak-coreg/mne/gui/tests/test_coreg_gui.py#L152
|
Presumably. I would run the current version, check coverage, delete
coverage file, delete lines, run, check coverage to verify.
…On Jan 27, 2017 17:03, "Christian Brodbeck" ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In mne/gui/tests/test_coreg_gui.py
<#3935>:
> @@ -146,22 +153,42 @@ def test_coreg_model():
finally:
This does not display the way I wanted, I mean this test:
https://github.com/Eric89GXL/mne-python/blob/tweak-coreg/
mne/gui/tests/test_coreg_gui.py#L152
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3935>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACQZXnxthBok9kGbQZ4disAsEvW0sZRpks5rWmnJgaJpZM4Lux-O>
.
|
|
Ok I'll look into removing that test in a different PR so that we can keep going with this. The last was just a flake error. Should be good to go when CIs are done. |
|
Thanks for helping this along @christianbrodbeck |
|
when running "mne coreg -s sample -f ~/mne_data/MNE-sample-data/MEG/sample/sample_audvis_raw.fif --verbose --head-opacity=0.5 --low-res-head" I get File "/Users/alex/anaconda/envs/py35/lib/python3.5/site-packages/traitsui/qt4/enum_editor.py", line 433, in rebuild_editor any idea? |
|
@agramfort could you post a complete traceback? I can't reproduce with an equivalent command, what is your SUBJECTS_DIR? |
|
I also can't reproduce (at least when I set |
|
|
Do you have this problem before these commits, too? I suspect you have some conda package problem and it's not due to this PR |
|
indeed I don't have the pb with my 2.7 env... weird....
|
This PR:
verboseoption to the Coreg GUI.CoregGUI.__init__to avoid a bug wheremne coreg -s whomever -f inst.fifwouldn't usewhomeverbut rather the name guessed byinst.fif. Although you could pass--no-guess-mrito work around this bug, this shouldn't be necessary (if MRI is specified, it should be used)Propertycalls to make it easier to visually track dependencies (should help refactoring)freesurferrequirement for one of the tests.Ready for review/merge @christianbrodbeck