Hello Valentin,<br><br>Thanks for the reply.<br><br>I&#39;m including the requested info:<br>PyMVPA 0.4.3 on Fedora 10 x86_64.<br><br>Here is the relevant part of the script:<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">

    blockavged_dataset = NiftiDataset(samples=niftiFile,<br>        labels=attrs.labels, chunks=attrs.chunks, labels_map={&#39;cat1&#39;: 0, &#39;cat2&#39;: 1, &#39;cat3&#39;: 2, &#39;cat4&#39;: 3, &#39;cat5&#39;: 4},<br>

        mask=maskFile)<br><br>    # remove first category from dataset<br>    blockavged_dataset = blockavged_dataset.selectSamples(N.array([l != 0 for l in blockavged_dataset.labels],<br>                                            dtype=&#39;bool&#39;))<br>

<br>    &quot;&quot;&quot;Create a dissimilarity matrix based on the labels of the data points<br>    in our test dataset.  This will allow us to see if there is a correlation<br>    between any given searchlight sphere and the experimental conditions.&quot;&quot;&quot;<br>

<br>    # create dissimilarity matrix using the &#39;confusion&#39; distance<br>    # metric<br>    dsm = DSMatrix(blockavged_dataset.labels, &#39;confusion&#39;) </blockquote><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">

    #<br>    # Run Searchlight<br>    #<br><br>    # choose classifier<br>    dsmetric = DSMDatasetMeasure(dsm, &#39;pearson&#39;, &#39;pearson&#39;)<br><br>    for radius in [6.4,9.6]:<br><br>        # tell which one we are doing<br>

        print &quot;Running searchlight with radius: %.2fmm...&quot; % (radius)<br><br>        # setup Searchlight with a custom radius<br>        # radius has to be in the same unit as the nifti file&#39;s pixdim<br>        # property.<br>

        sl = Searchlight(dsmetric, radius=radius)<br><br>        # run searchlight on example dataset and retrieve error map<br>        sl_map = sl(blockavged_dataset)<br></blockquote><br><br>Thank you,<br>Michael<br><br>

<br><div class="gmail_quote">On Sun, Dec 13, 2009 at 3:43 PM, Valentin Haenel <span dir="ltr">&lt;<a href="mailto:valentin.haenel@gmx.de" target="_blank">valentin.haenel@gmx.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Dear Micheal,<br>
<br>
could you please post pymvpa version, operating system, and the script you are<br>
using (if possible).<br>
<br>
The sphere size might not be the issue, since the searchlight will have less<br>
features at the edges of the brain, but its hard to tell from the error<br>
message alone.<br>
<br>
thanks.<br>
<br>
V-<br>
<br>
* Michael W. Cole &lt;<a href="mailto:mwcole@gmail.com" target="_blank">mwcole@gmail.com</a>&gt; [091213]:<br>
<div><div></div><div>&gt; I am trying to run a searchlight analysis based on the searchlight_dsm.py<br>
&gt; example. I&#39;m doing a 4-way classification with 2-voxel radius spheres.<br>
&gt;<br>
&gt; It will run for a few spheres, then crash with this error:<br>
&gt;<br>
&gt; Traceback (most recent call last):<br>
&gt;   File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>
&gt;   File &quot;pymvpa_script1.py&quot;, line 154, in &lt;module&gt;<br>
&gt;     sl_map = sl(blockavged_dataset)<br>
&gt;   File &quot;/usr/lib64/python2.5/site-packages/mvpa/measures/base.py&quot;, line 105,<br>
&gt; in __call__<br>
&gt;     result = self._call(dataset)<br>
&gt;   File &quot;/usr/lib64/python2.5/site-packages/mvpa/measures/searchlight.py&quot;,<br>
&gt; line 108, in _call<br>
&gt;     measure = self.__datameasure(sphere)<br>
&gt;   File &quot;/usr/lib64/python2.5/site-packages/mvpa/measures/ds.py&quot;, line 47, in<br>
&gt; __call__<br>
&gt;     test_mat = N.asarray([in_vec, dset_vec])<br>
&gt;   File &quot;/usr/lib64/python2.5/site-packages/numpy/core/numeric.py&quot;, line 230,<br>
&gt; in asarray<br>
&gt;     return array(a, dtype, copy=False, order=order)<br>
&gt; ValueError: setting an array element with a sequence.<br>
&gt;<br>
&gt; I&#39;ve found that the spheres that work have 1830 values each in in_vec and<br>
&gt; dset_vec, but the sphere it crashes on only has 1540 values. I&#39;m not sure if<br>
&gt; this is related to the crash or not.<br>
&gt;<br>
&gt; Any ideas on how to get around this error?<br>
&gt;<br>
&gt; Thanks in advance!<br>
&gt;<br>
&gt; Michael<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Michael W. Cole, Ph.D.<br>
&gt; Post-doctoral researcher<br>
&gt; Cognitive Control &amp; Psychopathology Lab<br>
&gt; Washington University in St. Louis<br>
<br>
</div></div><div><div></div><div>&gt; _______________________________________________<br>
&gt; Pkg-ExpPsy-PyMVPA mailing list<br>
&gt; <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
&gt; <a href="http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
<br>
<br>
_______________________________________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Michael W. Cole, Ph.D.<br>Post-doctoral researcher<br>Cognitive Control &amp; Psychopathology Lab<br>Washington University in St. Louis<br>