[Neuroimaging] Nibabel release imminent

Yaroslav Halchenko lists at onerussian.com
Mon Aug 1 12:14:15 EDT 2016


On Sat, 30 Jul 2016, Matthew Brett wrote:
> > some detected changes in behaviour of nibabel are detected within pymvpa
> > tests... yet to look in details

> > ======================================================================
> > ERROR: test_surf_gifti (mvpa2.tests.test_surfing.SurfTests)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/build/pymvpa2-2.3.1/debian/tmp/usr/lib/python2.7/dist-packages/mvpa2/testing/tools.py", line 165, in newfunc
> >     func(*(arg + (filename,)), **kw)
> >   File "/build/pymvpa2-2.3.1/debian/tmp/usr/lib/python2.7/dist-packages/mvpa2/tests/test_surfing.py", line 1081, in test_surf_gifti
> >     surf.write(fn, s)
> >   File "/build/pymvpa2-2.3.1/debian/tmp/usr/lib/python2.7/dist-packages/mvpa2/support/nibabel/surf.py", line 2229, in write
> >     surf_gifti.write(fn, s, overwrite=overwrite)
> >   File "/build/pymvpa2-2.3.1/debian/tmp/usr/lib/python2.7/dist-packages/mvpa2/support/nibabel/surf_gifti.py", line 254, in write
> >     xml = to_xml(s, fn)
> >   File "/build/pymvpa2-2.3.1/debian/tmp/usr/lib/python2.7/dist-packages/mvpa2/support/nibabel/surf_gifti.py", line 203, in to_xml
> >     img = to_gifti_image(img)
> >   File "/build/pymvpa2-2.3.1/debian/tmp/usr/lib/python2.7/dist-packages/mvpa2/support/nibabel/surf_gifti.py", line 162, in to_gifti_image
> >     arr.num_dim = len(arr.dims)
> > AttributeError: can't set attribute

> The GiftiDataArray object now has `num_dims` as a property.  We could
> add a setter that raises an error if the value is not as expected, and
> a deprecation  warning otherwise - OK with you?

sure.  I will also fixup pymvpa for that so next release would all be
ready ;)  Thanks!


> > ======================================================================
> > FAIL: mvpa2.tests.test_niftidataset.test_assumptions_on_nibabel_behavior
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
> >     self.test(*self.arg)
> >   File "/build/pymvpa2-2.3.1/debian/tmp/usr/lib/python2.7/dist-packages/mvpa2/testing/tools.py", line 165, in newfunc
> >     func(*(arg + (filename,)), **kw)
> >   File "/build/pymvpa2-2.3.1/debian/tmp/usr/lib/python2.7/dist-packages/mvpa2/tests/test_niftidataset.py", line 425, in test_assumptions_on_nibabel_behavior
> >     assert_equal(slope, 1.0)
> > AssertionError: None != 1.0

> Does this one work on current released nibabel?   This behavior
> changed before version 2 as I remember - the slope and intercept are
> recorded as None in the header by default, after reading.

oh -- sorry about the noise on this one -- I have missed that I was
testing against elderly release (2.3.1) instead of the most recent one
(2.5.0) on this one...  And that one is all cool ;)



-- 
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 Neuroimaging mailing list