[pymvpa] Antwort: Re: Antwort: Re: Loading normalized data with 'get_model_bold_dataset' fails

lydia.hellrung at econ.uzh.ch lydia.hellrung at econ.uzh.ch
Fri Jun 2 15:04:29 UTC 2017


No, they all have 195 volumes, but the geometry information is apparently
saved differently.
The output says:

./sub002/BOLD/task001_run001/bold_irbadvols.nii.gz    float32 [112, 112,
27, 195] 1.96x1.96x4.06x2.00  #exts: 1 sform
./sub002/BOLD/task001_run001/bold_iwrbadvols.nii.gz   float32 [105, 127,
105, 195] 1.50x1.50x1.50x0.00  #exts: 1

while the first file could be loaded, the second one not. Could that be an
issue? And in case, what would be needed?
If I check the headers, it says qform_code = 1 for first file and
qform_code = 4 for second one.

Thanks
Lydia

-----------------------------------------------------------------------------------------
Dr. rer. nat. Lydia Hellrung, Dipl.-Inf.
University of Zurich
Department of Economics
Blümlisaplstraße 10
8006 Zurich, Switzerland
phone: + 41 (0) 44 634 4838

e-mail: lydia.hellrung at econ.uzh.ch
-----------------------------------------------------------------------------------------



Von:	Yaroslav Halchenko <debian at onerussian.com>
An:	pkg-exppsy-pymvpa at lists.alioth.debian.org
Datum:	02/06/2017 16:42
Betreff:	Re: [pymvpa] Antwort: Re: Loading normalized data with
            'get_model_bold_dataset' fails
Gesendet von:	"Pkg-ExpPsy-PyMVPA" <pkg-exppsy-pymvpa-bounces
            +lydia.hellrung=econ.uzh.ch at lists.alioth.debian.org>




On Fri, 02 Jun 2017, lydia.hellrung at econ.uzh.ch wrote:

>    Dear Yaroslav,

>    there is the full traceback:

>    /usr/lib/python2.7/dist-packages/nipy/modalities/fmri/hemodynamic_models.py:176:

>    RuntimeWarning: divide by zero encountered in double_scalars
>      min_onset) * oversampling) + 1
>    Traceback (most recent call last):
>      File "load.py2", line 31, in <module>
>        time_attr='time_coords', condition_attr='condition')
>      File
>    "/usr/lib/python2.7/dist-packages/mvpa2/datasets/sources/openfmri.py",
>    line 656, in get_model_bold_dataset
>        'mask', 'add_fa', 'add_sa')]))
>      File
"/usr/lib/python2.7/dist-packages/mvpa2/datasets/eventrelated.py",
>    line 574, in fit_event_hrf_model
>        **design_kwargs)
>      File
>
"/usr/lib/python2.7/dist-packages/nipy/modalities/fmri/design_matrix.py",
>    line 433, in make_dmtx
>        paradigm, hrf_model.lower(), frametimes, fir_delays, min_onset)
>      File
>
"/usr/lib/python2.7/dist-packages/nipy/modalities/fmri/design_matrix.py",
>    line 200, in _convolve_regressors
>        min_onset=min_onset)
>      File
>
"/usr/lib/python2.7/dist-packages/nipy/modalities/fmri/hemodynamic_models.py",

>    line 360, in compute_regressor
>        exp_condition, frametimes, oversampling, min_onset)
>      File
>
"/usr/lib/python2.7/dist-packages/nipy/modalities/fmri/hemodynamic_models.py",

>    line 180, in _sample_condition
>        n_hr)
>      File "/usr/lib/python2.7/dist-packages/numpy/core/function_base.py",
>    line 76, in linspace
>        num = int(num)
>    OverflowError: cannot convert float infinity to integer

could it be that some "bold" volume in your dataset has only a single
volume?


That would make  n =1 in

		 frametimes.max() * (1 + 1. / (n - 1))

thus inf ...

you can use smth like

		 find -iname *bold*nii.gz | xargs nib-ls

to quickly review all the bold volumes to have 4th dimension non-degenerate

--
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik

_______________________________________________
Pkg-ExpPsy-PyMVPA mailing list
Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20170602/3839b442/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20170602/3839b442/attachment-0001.gif>


More information about the Pkg-ExpPsy-PyMVPA mailing list