<div dir="ltr">Are all datasets supposed to have mappers? My data set was loaded directly from a NIFTI file, using mvpa2.datasets.mri.fmri_dataset, and when I loaded it there was no mapper attached, though I attributed it target values and chunks. In other words, my original data set also does not have any mappers. Should I be manually attributing mappers to my data set (e.g., the searchlight call or the z-scoring call) and attach all those mappers as a Chain?<div>
<br></div><div>Thanks!</div><div>Taku</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 2, 2013 at 11:02 AM, Yaroslav Halchenko <span dir="ltr"><<a href="mailto:debian@onerussian.com" target="_blank">debian@onerussian.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">do in ipython<br>
<br>
map2nifti?<br>
<br>
and check out its doc:<br>
<br>
Definition: map2nifti(dataset, data=None, imghdr=None, imgtype=None)<br>
Docstring:<br>
Maps data(sets) into the original dataspace and wraps it into an Image.<br>
<br>
Parameters<br>
----------<br>
dataset : Dataset<br>
The mapper of this dataset is used to perform the reverse-mapping.<br>
data : ndarray or Dataset, optional<br>
The data to be wrapped into NiftiImage. If None (default), it<br>
would wrap samples of the provided dataset. If it is a Dataset<br>
instance -- takes its samples for mapping.<br>
<br>
<br>
so if your res[1] doesn't have the mapper, just give as the first argument the<br>
original dataset which had it and which you gave to searchlight call<br>
<div class="im"><br>
On Fri, 01 Nov 2013, Taku Ito wrote:<br>
<br>
> Hi again,<br>
> I'm having issues with saving searchlight maps back to NIFTI format...<br>
> I've been using the mvpa2.datasets.mri.map2nifti module and I've tried<br>
> both<br>
> map2nifti(res[1])�<br>
> #and�<br>
> map2nifti(res[1]).save('s1.nii.gz')<br>
> But both come back with the<br>
> AttributeError: 'DatasetAttributesCollection' object has no attribute<br>
> 'mapper'<br>
> It seems that I have no mapper in my data set object - however, all I've<br>
> done on the original data set is take out some samples, z-score them, and<br>
> run an mvpa searchlight analysis with a NFoldPartitioner and Balancer<br>
> (combined into a chainNode). �It seems that the dimensions of the output<br>
> data set are essentially the same, minus the fact that the number of<br>
> samples was reduced from 360 to 150 or so.<br>
> I have, been able to use the h5save() command for hdf5 files, but would<br>
> like to get it into NIFTI format so I can view the statistical maps in<br>
> AFNI. �<br>
> Please let me know if you have any insights! Your help is appreciated.<br>
> Taku<br>
--<br>
</div>Yaroslav O. Halchenko, Ph.D.<br>
<a href="http://neuro.debian.net" target="_blank">http://neuro.debian.net</a> <a href="http://www.pymvpa.org" target="_blank">http://www.pymvpa.org</a> <a href="http://www.fail2ban.org" target="_blank">http://www.fail2ban.org</a><br>
Senior Research Associate, Psychological and Brain Sciences Dept.<br>
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755<br>
Phone: <a href="tel:%2B1%20%28603%29%20646-9834" value="+16036469834">+1 (603) 646-9834</a> Fax: <a href="tel:%2B1%20%28603%29%20646-1419" value="+16036461419">+1 (603) 646-1419</a><br>
WWW: <a href="http://www.linkedin.com/in/yarik" target="_blank">http://www.linkedin.com/in/yarik</a><br>
<br>
_______________________________________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a></blockquote></div><br><br clear="all"><div>
<br></div>-- <br><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><font color="#666666">Takuya Ito</font></span><br><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><font color="#666666">Cognitive Control & Psychopathology Laboratory</font></span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><font color="#666666">Washington University in St. Louis<br></font></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><font color="#666666"><br>
</font></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><font color="#666666">Cole Neuroscience Laboratory (</font></span><font color="#666666"><a href="http://www.mwcole.net/" target="_blank">http://www.mwcole.net/</a>)</font></div>
<div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><font color="#666666">Center for Molecular and Behavioral Neuroscience (CMBN)</font></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><font color="#666666">Rutgers-Newark University</font></span></div>
</div>
</div>