open-discussion > Registration issue with pyMVPA tutorial data
Showing 1-1 of 1 posts
Display:
Results per page:
Oct 26, 2021  02:10 PM | John Johnson - Georgia Institute of Technology
Registration issue with pyMVPA tutorial data
I'm working through the searchlight tutorial.
My latest challenge is shown below. The results of the searchlight are out of registration with the MNI152_T1_1mm_brain standard as shown in FSLeyes.

I would appreciate any insight as to how to correct the registration.
Also, just a sanity check of the results would be very helpful.
Thanks!
from mvpa2.tutorial_suite import *
hds = get_haxby2001_data_alternative(roi='brain')
hclf = kNN(k=1, dfx=one_minus_correlation, voting='majority')
hcv = CrossValidation(hclf, HalfPartitioner())
hsl = sphere_searchlight(hcv, radius=3, postproc=mean_sample())
hres = sl(hds)
sphere_errors = hres.samples[0]
hres_mean = np.mean(hres)
hres_std = np.std(hres)
chance_level = 1.0 - (1.0 / len(hds.uniquetargets))
frac_lower = np.round(np.mean(sphere_errors < chance_level - 2 * hres_std), 3)
map2nifti(hds, 1.0 - sphere_errors).to_filename('hsl.nii.gz')
# Trying reverse mapping to see if registration is correct (nope)
revtest = np.arange(100, 100 + hds.nfeatures)
rmapped = hds.a.mapper.reverse1(revtest)
rmapped.shape
#'imghdr' in ds.a
hnimg = map2nifti(hds, revtest)
hnimg = map2nifti(hds, 1.0 - sphere_errors)
hnimg.to_filename('hrsl.nii.gz')