[pymvpa] Antwort: Re: Loading normalized data with 'get_model_bold_dataset' fails
Yaroslav Halchenko
debian at onerussian.com
Fri Jun 2 14:42:03 UTC 2017
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
More information about the Pkg-ExpPsy-PyMVPA
mailing list