External Email - Use Caution
Sorry, my mistake. The command and the error are below.
Thanks,
Vladimir
In [117]: bem_file=subject+'-bem.fif'
...:
...: if op.isfile(bem_file):
...: bem = mne.read_bem_surfaces(bem_file)
...: else:
...: bem = mne.make_bem_model(mri_dir)
...: mne.write_bem_surfaces(bem_file, bem)
Creating the BEM geometry...
Going from 5th to 4th subdivision of an icosahedron (n_tri: 20480 -> 5120)
Going from 5th to 4th subdivision of an icosahedron (n_tri: 20480 -> 5120)
Going from 5th to 4th subdivision of an icosahedron (n_tri: 20480 -> 5120)
outer skin CM is 0.90 -5.99 -0.58 mm
outer skull CM is 0.90 -5.96 -1.02 mm
inner skull CM is 0.85 -6.62 6.36 mm
Checking that outer skull surface is inside outer skin surface...
Checking that inner skull surface is inside outer skull surface...
Traceback (most recent call last):
File "<ipython-input-117-e6e8d7e63470>", line 6, in <module>
bem = mne.make_bem_model(mri_dir)
File "<string>", line 2, in make_bem_model
File "/home/vladimir/.conda/envs/mne/lib/python3.6/site-packages/mne/utils.py",
line 729, in verbose
return function(*args, **kwargs)
File "/home/vladimir/.conda/envs/mne/lib/python3.6/site-packages/mne/bem.py",
line 572, in make_bem_model
surfaces = _surfaces_to_bem(surfaces, ids, conductivity, ico)
File "/home/vladimir/.conda/envs/mne/lib/python3.6/site-packages/mne/bem.py",
line 502, in _surfaces_to_bem
_check_surfaces(surfs, incomplete=incomplete)
File "/home/vladimir/.conda/envs/mne/lib/python3.6/site-packages/mne/bem.py",
line 443, in _check_surfaces
_assert_inside(surf_2, surf_1)
File "/home/vladimir/.conda/envs/mne/lib/python3.6/site-packages/mne/bem.py",
line 432, in _assert_inside
% (_surf_name[fro['id']], _surf_name[to['id']]))
RuntimeError: Surface inner skull is not completely inside surface outer skull