[pymvpa] problem with loading bold.nii.gz

Leila Reddy leils at yahoo.com
Fri Mar 26 10:18:00 UTC 2010


Hi,

I am a new pymvpa user. I have been trying to follow the examples provided with pymvpa but when I try to load bold.nii.gz (from the example dataset provided with pymvpa) I get the following error. I am able to read the .nii however. Has anyone else encountered this problem?

Thanks in advance,
Leila
-----
In [13]: dataset = NiftiDataset(samples='bold.nii.gz',
                       labels=attr.labels,
                       chunks=attr.chunks,
                       mask='mask.nii.gz')
** ERROR: nifti_convert_nhdr2nim: bad datatype
** ERROR (nifti_image_read): cannot create nifti image from header 'bold.nii.gz'
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)

/Volumes/DATA/pymvpa-exampledata/<ipython console> in <module>()

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mvpa/datasets/nifti.pyc in __init__(self, samples, mask, dsattr, enforce_dim, **kwargs)
    183         # load the samples

    184         niftisamples = getNiftiFromAnySource(samples, ensure=True,
--> 185                                              enforce_dim=enforce_dim)
    186         samples = niftisamples.data
    187 

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mvpa/datasets/nifti.pyc in getNiftiFromAnySource(src, ensure, enforce_dim)
     69             warning("ERROR: NiftiDatasets: Cannot open NIfTI file %s" \
     70                     % src)
---> 71             raise e
     72     elif isinstance(src, NiftiImage):
     73         # nothing special


RuntimeError: Error while opening NIfTI file 'bold.nii.gz'.

wtf() info:
In [24]: wtf()
Out[24]: 
Current date:   2010-03-26 11:16
PyMVPA:
 Version:       0.4.3
 Path:          /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mvpa/__init__.pyc
 Version control (GIT):
 GIT information could not be obtained due "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mvpa/.. is not under GIT"
SYSTEM:
 OS:            posix Darwin 9.2.0 Darwin Kernel Version 9.2.0: Tue Feb  5 16:13:22 PST 2008; root:xnu-1228.3.13~1/RELEASE_I386
 Distribution:   10.5.2/i386
EXTERNALS:
 Present:       cPickle, ctypes, good scipy.stats.rdist, good scipy.stats.rv_discrete.ppf, griddata, gzip, hcluster, libsvm, matplotlib, nifti, nifti ge 0.20090205.1, numpy, pylab, pylab plottable, pywt, running ipython env, scipy, sg ge 0.6.4, sg_fixedcachesize, shogun, shogun.mpd, weave
 Absent:        atlas_fsl, atlas_pymvpa, elasticnet, glmnet, lars, libsvm verbosity control, lxml, mdp, mdp ge 2.4, openopt, pywt wp reconstruct, pywt wp reconstruct fixed, reportlab, rpy, shogun.lightsvm, shogun.svrlight
 Versions of critical externals:
  ctypes      : 1.1.0
  matplotlib  : 0.99.1.1
  nifti       : 0.20090303.1
  numpy       : 1.3.0
  pywt        : 0.1.6
  scipy       : 0.7.1
  shogun      : v0.9.1_r4481_2009-11-16_10:14_
 Matplotlib backend: TkAgg
RUNTIME:
 PyMVPA Environment Variables:
  PYTHONPATH          : "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages:/opt/local/bin:/opt/local/sbin:/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/mni/bin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/X11R6/bin:.:/Applications/MATLAB74/bin:/Applications/freesurfer/froi/bin:/Users/vanrullenrufin/bin"
 PyMVPA Runtime Configuration:
  [externals]
  have griddata = yes
  have good scipy.stats.rdist = yes
  have pylab plottable = yes
  have pywt wp reconstruct = no
  have mdp = no
  have lxml = no
  have running ipython env = yes
  have sg_fixedcachesize = yes
  have elasticnet = no
  have shogun.mpd = yes
  have matplotlib = yes
  have pywt wp reconstruct fixed = no
  have scipy = yes
  have reportlab = no
  have openopt = no
  have libsvm = yes
  have nifti ge 0.20090205.1 = yes
  have weave = yes
  have atlas_fsl = no
  have ctypes = yes
  have hcluster = yes
  have sg ge 0.6.4 = yes
  have good scipy.stats.rv_discrete.ppf = yes
  have libsvm verbosity control = no
  have mdp ge 2.4 = no
  have shogun.svrlight = no
  have rpy = no
  have shogun = yes
  have glmnet = no
have lars = no
  have atlas_pymvpa = no
  have nifti = yes
  have cpickle = yes
  have numpy = yes
  have pylab = yes
  have shogun.lightsvm = no
  have pywt = yes
  have gzip = yes
  
  [general]
  verbose = 1


      



More information about the Pkg-ExpPsy-PyMVPA mailing list