[pymvpa] Problems with 'preproc_fsl_ev.py'

Matthias Ekman matthias.ekman at googlemail.com
Wed Jan 28 12:08:43 UTC 2009


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?

Best regards,
Matthias



More information about the Pkg-ExpPsy-PyMVPA mailing list