[pymvpa] saving searchlight results
Yaroslav Halchenko
debian at onerussian.com
Wed Feb 11 21:09:53 UTC 2009
> This did successfully save, however, when I opened the file in Afni the
> overlayed file was about 1/6 the size of my high res scan. Clearly, not the same
> space as my original dataset. How can I map the results into the same space as
> my original dataset?
I guess you have meant that you've lost all metrics information (ie
voxel sizes, etc), lets see why that happened:
> orig_s1_map = dataset.mapReverse(N.array(s1_map))
here you got sensitivities (1D matrix) and mapped it back into 3D matrix
which has no information on voxel sizes, qform etc
> NiftiImage(orig_s1_map).save('searchlight_results.nii.gz')
here you created a new NiftiImage based on that 3D and stored it...
what is advised is to use .map2Nifti method of NiftiDataset, just look
into
doc/examples/searchlight.py:
so you would need just
dataset.map2Nifti(s1_map).save('...')
--
Yaroslav Halchenko
Research Assistant, Psychology Department, Rutgers-Newark
Student Ph.D. @ CS Dept. NJIT
Office: (973) 353-1412 | FWD: 82823 | Fax: (973) 353-1171
101 Warren Str, Smith Hall, Rm 4-105, Newark NJ 07102
WWW: http://www.linkedin.com/in/yarik
More information about the Pkg-ExpPsy-PyMVPA
mailing list