[Mne_analysis] reading bem solution

Alexandre Gramfort alexandre.gramfort at telecom-paristech.fr
Thu Jan 21 09:05:02 EST 2016
Search archives:

hi Tadeusz,

can you share the problematic file.

Alex


On Thu, Jan 21, 2016 at 2:33 PM, Tadeusz W. Kononowicz <
t.w.kononowicz at icloud.com> wrote:

> Hello Mne Users,
>
>
>
> This code works fine:
>
> bem1 = path + '-20480-20480-20480-bem-sol.fif'
>
> surfaces = mne.read_bem_surfaces(bem1)
>
>
> But when I want to read another solution I got that. Any hints?
>
>
>
> bem2 = path + '-5120-5120-5120-bem-sol.fif'
>
> surfaces = mne.read_bem_surfaces(bem2)
>
>
> ---------------------------------------------------------------------------
>
> IOError Traceback (most recent call last)
>
> <ipython-input-10-5b41654e22f2> in <module>()
>
> ----> 1 surfaces = mne.read_bem_surfaces(sub_name_bem)
>
>
> /home/tkononow/anaconda2/lib/python2.7/site-packages/mne-0.11.0-py2.7.egg/mne/bem.pyc
> in read_bem_surfaces(fname, patch_stats, s_id, verbose)
>
>
> /home/tkononow/anaconda2/lib/python2.7/site-packages/mne-0.11.0-py2.7.egg/mne/utils.pyc
> in verbose(function, *args, **kwargs)
>
> 549 finally:
>
> 550 set_log_level(old_level)
>
> --> 551 return function(*args, **kwargs)
>
> 552
>
> 553
>
>
> /home/tkononow/anaconda2/lib/python2.7/site-packages/mne-0.11.0-py2.7.egg/mne/bem.pyc
> in read_bem_surfaces(fname, patch_stats, s_id, verbose)
>
> 1063 coord_frame = FIFF.FIFFV_COORD_MRI
>
> 1064 # Open the file, create directory
>
> -> 1065 f, tree, _ = fiff_open(fname)
>
> 1066 with f as fid:
>
> 1067 # Find BEM
>
>
> /home/tkononow/anaconda2/lib/python2.7/site-packages/mne-0.11.0-py2.7.egg/mne/io/open.pyc
> in fiff_open(fname, preload, verbose)
>
>
> /home/tkononow/anaconda2/lib/python2.7/site-packages/mne-0.11.0-py2.7.egg/mne/utils.pyc
> in verbose(function, *args, **kwargs)
>
> 549 finally:
>
> 550 set_log_level(old_level)
>
> --> 551 return function(*args, **kwargs)
>
> 552
>
> 553
>
>
> /home/tkononow/anaconda2/lib/python2.7/site-packages/mne-0.11.0-py2.7.egg/mne/io/open.pyc
> in fiff_open(fname, preload, verbose)
>
> 144 directory.append(tag)
>
> 145
>
> --> 146 tree, _ = make_dir_tree(fid, directory)
>
> 147
>
> 148 logger.debug('[done]')
>
>
> /home/tkononow/anaconda2/lib/python2.7/site-packages/mne-0.11.0-py2.7.egg/mne/io/tree.pyc
> in make_dir_tree(fid, directory, start, indent, verbose)
>
>
> /home/tkononow/anaconda2/lib/python2.7/site-packages/mne-0.11.0-py2.7.egg/mne/utils.pyc
> in verbose(function, *args, **kwargs)
>
> 549 finally:
>
> 550 set_log_level(old_level)
>
> --> 551 return function(*args, **kwargs)
>
> 552
>
> 553
>
>
> /home/tkononow/anaconda2/lib/python2.7/site-packages/mne-0.11.0-py2.7.egg/mne/io/tree.pyc
> in make_dir_tree(fid, directory, start, indent, verbose)
>
> 76 if directory[this].kind == FIFF_BLOCK_START:
>
> 77 if this != start:
>
> ---> 78 child, this = make_dir_tree(fid, directory, this, indent + 1)
>
> 79 tree['nchild'] += 1
>
> 80 tree['children'].append(child)
>
>
> /home/tkononow/anaconda2/lib/python2.7/site-packages/mne-0.11.0-py2.7.egg/mne/io/tree.pyc
> in make_dir_tree(fid, directory, start, indent, verbose)
>
>
> /home/tkononow/anaconda2/lib/python2.7/site-packages/mne-0.11.0-py2.7.egg/mne/utils.pyc
> in verbose(function, *args, **kwargs)
>
> 549 finally:
>
> 550 set_log_level(old_level)
>
> --> 551 return function(*args, **kwargs)
>
> 552
>
> 553
>
>
> /home/tkononow/anaconda2/lib/python2.7/site-packages/mne-0.11.0-py2.7.egg/mne/io/tree.pyc
> in make_dir_tree(fid, directory, start, indent, verbose)
>
> 55
>
> 56 if directory[start].kind == FIFF_BLOCK_START:
>
> ---> 57 tag = read_tag(fid, directory[start].pos)
>
> 58 block = tag.data
>
> 59 else:
>
>
> /home/tkononow/anaconda2/lib/python2.7/site-packages/mne-0.11.0-py2.7.egg/mne/io/tag.pyc
> in read_tag(fid, pos, shape, rlims)
>
> 480 if tag.next != FIFF.FIFFV_NEXT_SEQ:
>
> 481 # f.seek(tag.next,0)
>
> --> 482 fid.seek(tag.next, 1) # XXX : fix? pb when tag.next < 0
>
> 483
>
> 484 return tag
>
>
> IOError: [Errno 22] Invalid argument
>
>
>
> Thank you for your help,
>
>
> Tadeusz W. Kononowicz
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160121/4cd225c0/attachment-0001.html 


More information about the Mne_analysis mailing list