[pymvpa] Problems with 'preproc_fsl_ev.py'
Matthias Ekman
matthias.ekman at googlemail.com
Wed Jan 28 12:24:54 UTC 2009
Hi Michael,
Michael Hanke wrote:
> Hi Matthias,
>
> [ this message was probably intended for the PyMVPA mailing list.
> Therefore I am CC'ing both lists and doing a full quote. Let's move to
> the appropriate list -- 'Reply-to' is set accordingly. ]
>
>
> On Wed, Jan 28, 2009 at 11:45:03AM +0100, Matthias Ekman wrote:
>> Hi!
>>
>> I have some problems concerning the preproc_fsl_ev.py example shipped
>> within the /doc/examples directory of pymvpa-0.4.0.
>> (as far a I can see, there is no difference btw. preproc_fsl_ev.py in
>> pymvpa-0.4.0 and pymvpa-0.4.1)
>>
>> Running the 'original' preproc_fsl_ev.py like:
>> ./preproc_fsl_ev.py filtered_func_data.nii.gz ev1 ev1.txt
>>
>> I'm getting this error:
>>
>> Loading data
>> Preprocess data
>> Traceback (most recent call last):
>> File "./preproc_fsl_ev.py", line 123, in <module>
>> main()
>> File "./preproc_fsl_ev.py", line 89, in main
>> decimals = 0 ).astype('int') for ev in evs ]
>> AttributeError: Values instance has no attribute 'tr'
>>
>> Replace "options.tr" in line 88 with "opt.tr" and comment line 70 to 83,
>> I'm getting this error with the 'modified' preproc_fsl_ev.py:
>>
>> Loading data
>> Preprocess data
>> Traceback (most recent call last):
>> File "./preproc_fsl_ev.py", line 123, in <module>
>> main()
>> File "./preproc_fsl_ev.py", line 89, in main
>> decimals = 0 ).astype('int') for ev in evs ]
>> File "/var/lib/python-support/python2.5/nifti/utils.py", line 44, in
>> time2vol
>> vol = N.round( ( tmp + lag + tr/2 ) / tr, decimals )
>> TypeError: unsupported operand type(s) for /: 'instance' and 'int'
>>
>>
>> My ev-file is looking like this:
>> 5.033 28 1
>> 558.329 28 1
>> 668.992 28 1
>> 1222.255 28 1
>> 1554.109 28 1
>>
>> but even with a dummy ev-file like:
>> 0 2 1
>> 2 4 1
>> 6 2 1
>>
>> I'm getting the same error message.
>>
>> Is it working for you? What am I missing here?
> No, I guess it is broken for everyone.
>
> Now let me start the excuse ;-)
>
> You touched one of the ancient parts of PyMVPA that nobody has used for a
> long time. At the same time this topic touches one of the most recent
> additions to PyMVPA. In short: nothing in this broken script is needed
> anymore and you have just triggered its removal.
>
> Unfortunately, there is no comprehensive documentation about the 'new'
> approach yet. I was working on this topic today and will continue with
> it when I am done writing this email. However, this will take more than
> a few days to finish.
>
> In the meantime I can only provide you with a few pointers into the
> module reference, so you might get an impression of how to proceed:
>
>
> http://www.pymvpa.org/modref/mvpa.misc.fsl.base.html?highlight=event#mvpa.misc.fsl.base.FslEV3.toEvents
>
> http://www.pymvpa.org/modref/mvpa.datasets.nifti.html?highlight=ernifti#mvpa.datasets.nifti.ERNiftiDataset
>
>
OK, I see! I will have a look.
Thanks!
Matthias
More information about the Pkg-ExpPsy-PyMVPA
mailing list