[Mne_analysis] -trans.fif

Alexandre Gramfort alexandre.gramfort at telecom-paristech.fr
Thu Feb 27 10:31:03 EST 2014
Search archives:

hi dan,

can you share the file?

the sampe trans file was generated with mne_analyze.

thanks

Alex


On Thu, Feb 27, 2014 at 4:21 PM, dgw <dgwakeman at gmail.com> wrote:
> You are using a pre-generated -trans.fif file, which is why you
> couldn't replicate the problem. I am using a -trans.fif file generated
> by mne_analyze. How was the -trans.fif file generated in the
> mne-python sample data?
>
> I have replicated this problem using both master and the current
> stable version of mne-python. Using the current stable version of MNE
> 2.7.0, but I am unsure if this is an mne-python problem or an
> mne_analyze problem.
>
> As I said, I'm not sure if this is a bug in mne_analyze or mne-python.
> The strange part is I know the data is in the file. If I use lower
> level commands I can get access to the transformation matrix. The
> question is is the format of the file wrong (missing some key fiff
> parts) or is the code for read_trans wrong.
>
> D
>
> On Wed, Feb 26, 2014 at 10:42 PM, Eric Larson <larson.eric.d at gmail.com> wrote:
>> Actually, I see that you're running version 0.7.1. Can you try latest
>> master? We might need to backport a fix, but I'm curious whether the latest
>> version works on your machine at least.
>>
>> Eric
>>
>>
>>
>> On Wed, Feb 26, 2014 at 7:40 PM, Eric Larson <larson.eric.d at gmail.com>
>> wrote:
>>>
>>> Hey Dan,
>>>
>>> I just tried to replicate the problem, but the `trans` file read okay on
>>> my machine. Which version of `mne` are you running?
>>>
>>> >>> import mne
>>> >>> data_path = mne.datasets.sample.data_path()
>>> >>> mri = data_path + '/MEG/sample/sample_audvis_raw-trans.fif'
>>> >>> mne.read_trans(mri)
>>> {'to': 5, 'dig': ...
>>>
>>> Eric
>>>
>>>
>>>
>>> On Wed, Feb 26, 2014 at 2:55 PM, dgw <dgwakeman at gmail.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I'm playing around with trans.fif files, and I have found some strange
>>>> behavior. First, if you generate a quick trans.fif file with the
>>>> sample data in mne_analyze. you cannot read it in with MNE-Python
>>>> utilizing mne.read_trans . I am not sure if this problem is due to
>>>> mne_analyze creating bad fif files or an MNE-Python bug.
>>>>
>>>> Here is the mne.read_trans error:
>>>> test = mne.read_trans('sample_audvis_raw-trans.fif')
>>>>
>>>> ---------------------------------------------------------------------------
>>>> IndexError                                Traceback (most recent call
>>>> last)
>>>> <ipython-input-6-8f82339f2100> in <module>()
>>>> ----> 1 test = mne.read_trans('sample_audvis_raw-trans.fif')
>>>>
>>>>
>>>> /usr/pubsw/packages/python/epd-7.3-1-rh5-x86_64/lib/python2.7/site-packages/mne-0.7.1-py2.7.egg/mne/transforms.pyc
>>>> in read_trans(fname)
>>>>     254     info = {}
>>>>     255     fid, tree, _ = fiff_open(fname)
>>>> --> 256     block = dir_tree_find(tree, FIFF.FIFFB_MNE)[0]
>>>>     257
>>>>     258     tag = find_tag(fid, block, FIFF.FIFF_COORD_TRANS)
>>>>
>>>> IndexError: list index out of range
>>>>
>>>> If I go into the file in either mne-python or mne-matlab, I find that
>>>> the block number is 0. This looks a little suspicious to me, as I
>>>> didn't believe block numbers could be 0, but I may be wrong. Any
>>>> thoughts?
>>>>
>>>> D
>>>> _______________________________________________
>>>> 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.
>>>>
>>>
>>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis



More information about the Mne_analysis mailing list