[Mne_analysis] Mne_analysis Digest, Vol 96, Issue 19

Tadeusz W. Kononowicz t.w.kononowicz at icloud.com
Thu Jan 21 09:13:31 EST 2016
Search archives:

Hi Alex,

Not sure how we can do it as the file is 3G big. 
Do you have an access to Neurospin server?

T.

On 21 Jan, 2016,at 03:05 PM, mne_analysis-request at nmr.mgh.harvard.edu wrote:

Send Mne_analysis mailing list submissions to
     mne_analysis at nmr.mgh.harvard.edu

To subscribe or unsubscribe via the World Wide Web, visit
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
or, via email, send a message with subject or body 'help' to
       mne_analysis-request at nmr.mgh.harvard.edu

You can reach the person managing the list at
     mne_analysis-owner at nmr.mgh.harvard.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Mne_analysis digest..."


Today's Topics:

1. reading bem solution (Tadeusz W. Kononowicz)
2. Re: reading bem solution (Alexandre Gramfort)


----------------------------------------------------------------------

Message: 1
Date: Thu, 21 Jan 2016 13:33:52 +0000 (GMT)
From: "Tadeusz W. Kononowicz" <t.w.kononowicz at icloud.com>
Subject: [Mne_analysis] reading bem solution
To: mne_analysis at nmr.mgh.harvard.edu
Message-ID: <0eea2f05-e157-40f6-bd2b-d08d4257c789 at me.com>
Content-Type: text/plain; charset="us-ascii"

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160121/55269845/attachment-0001.html 

------------------------------

Message: 2
Date: Thu, 21 Jan 2016 15:05:02 +0100
From: Alexandre Gramfort <alexandre.gramfort at telecom-paristech.fr>
Subject: Re: [Mne_analysis] reading bem solution
To: Discussion and support forum for the users of MNE Software
   <mne_analysis at nmr.mgh.harvard.edu>
Message-ID:
 <CADeotZohizT9KWWhA5H8zWJ5uQt3=u8ZYKg47XTu5Qtz4L1bwg at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

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.html 

------------------------------

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

End of Mne_analysis Digest, Vol 96, Issue 19
********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160121/7028975d/attachment-0001.html 


More information about the Mne_analysis mailing list