On 25.06.2013, at 15:05, Martin Luessi <notifications@github.com> wrote:

> In mne/tests/test_source_estimate.py:
> 
> >          assert_array_equal(stc.vertno, stc_new.vertno)
> >          assert_array_almost_equal(stc.data, stc_new.data)
> >  
> > +    # save the stc as a nifti file and export
> > +    try:
> > +        import nibabel as nib
> > +        src = read_source_spaces(fname_vsrc)
> > +        vol_fname = op.join(tempdir, 'stc.nii.gz')
> > +        stc.save_as_volume(vol_fname, src,
> > +                           dest='surf', mri_resolution=False)
> > +        img = nib.load(vol_fname)
> > +        assert_true(img.shape == src[0]['shape'] + (len(stc.times),))
> the parentheses are needed like that to make a tuple of length 1. Like this, a new tuple is created where the first 3 entries are from src[0]['shape'] and the last one is len(stc.times).
> 


Ah ok, sorry, was a bit early this morning, now I see it too ;-)

Besides this looks clean to me. We should also check nitime export ...

> —
> Reply to this email directly or view it on GitHub.