[Neuroimaging] Nibabel release imminent

Matthew Brett matthew.brett at gmail.com
Fri Jul 29 21:12:11 EDT 2016


Hi,

On Sat, Jul 30, 2016 at 1:44 AM, Yaroslav Halchenko
<lists at onerussian.com> wrote:
>
> On Fri, 29 Jul 2016, Yaroslav Halchenko wrote:
>
>> > I just put in a PR https://github.com/nipy/nibabel/pull/464 to deal
>> > with some unchecked assumptions in the new spatial processing code -
>> > I'd be very happy of a review.
>
>> > Are there any other changes that people want to push for, for this next release?
>
>> FWIW, builds/tests seems pass ok across majority of Debian/Ubuntus (on
>> 12.04 need to do more dancing around mpl to test).
>
>> I would really appreciate feedback on my "selfish" idea:
>> https://github.com/nipy/nibabel/pull/466
>
> 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?

> ======================================================================
> 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.

Cheers,

Matthew


More information about the Neuroimaging mailing list