-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[MRG] Mne watershed bem #2194
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
[MRG] Mne watershed bem #2194
Conversation
# Create BEM surfaces | ||
|
||
@verbose | ||
def make_watershed_bem(subject=None, subjects_dir=None, overwrite=False, |
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.
if subject is required it should not default to None
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.
also, please add this function to the docs, I see no edits to doc/source
Other than my minor gripes LGTM |
@Eric89GXL please take over. We need to add the test you suggested for sample-head.fif also I get a weird error when running `mne watershed_bem -s sample -o`` mne_convert_surface tells me:
|
I won't get to it until next week at the earliest, but I'll have a look then. I assume #2193 is the higher priority? |
#2193 is not short term priority for me. I'd rather close PRs that have
been opened for a long time.
|
I played more... Did not ask to replace existing volume geometry error happens to with bash script but it does not make it fail. With Python we catch the error so python script fails... just a status report... |
# | ||
os.chdir(ws_dir) | ||
if op.exists(T1_mgz): | ||
# XXX : do this with python code |
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.
@Eric89GXL we'll take care of this later.
ready from end now.
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.
thanks for adding the reminder note
Are we in a rush here? Can you give me 24 hours or so to find a moment to try this with some of my data? |
No rush. I d like Lorenzo to move on that's all
|
Yeah, that's good. I'll have noted it and find a moment ASAP to check it out. |
I finally have time to test this morning as well |
@@ -1025,7 +1032,8 @@ def set_memmap_min_size(memmap_min_size): | |||
'MNE_CACHE_DIR', | |||
'MNE_MEMMAP_MIN_SIZE', | |||
'MNE_SKIP_TESTING_DATASET_TESTS', | |||
'MNE_DATASETS_SPM_FACE_DATASETS_TESTS' | |||
'MNE_DATASETS_SPM_FACE_DATASETS_TESTS', | |||
'MNE_SKIP_SAMPLE_DATASET_TESTS' |
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.
we no longer need the MNE_SKIP_SAMPLE_DATASET_TESTS
key
@agramfort worked for me. I still wish we had a better test for the result, but I assume this will mostly be tested for quality by actual use in any case. +1 for merge after my last set of comments is addressed. And sorry for the delay in looking, I was away from my workstation that could actually handle the test. |
4187257
to
c2d34b0
Compare
pushed with a rebase |
Yes I am happy, thanks :) @dengemann feel free to merge when you're happy |
@dengemann happy? |
os.makedirs(bem_dir) | ||
if not op.exists(T1_dir) and not op.exists(T1_mgz): | ||
raise RuntimeError('Could not find the MRI data') | ||
if op.exists(ws_dir): |
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.
@agramfort here op.isdir
would probably be more precise, the same way op.isfile
would be more precise below ;)
@agramfort other than that running bems seems to work fine, also the overwrite is working. |
@@ -777,7 +784,7 @@ def run_subprocess(command, verbose=None, *args, **kwargs): | |||
"that you use '$HOME' instead of '~'.") | |||
warnings.warn(msg) | |||
|
|||
logger.info("Running subprocess: %s" % str(command)) | |||
logger.info("Running subprocess: %s" % ' '.join(command)) |
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.
@agramfort can you share a screenshot or print of output generated here?
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.
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.
where?
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.
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.
perfect!
Travis is not happy. |
the error seems unrelated. Test that fails is "Test creating fsaverage and scaling it" |
Ok. Then +1 for merge. |
cool ! @lorenzo-desantis please open new PR with next feature. |
taking over #1885
see my last commit.