<div dir="ltr"><span style="font-size:12.8000001907349px">Hi all,</span><div style="font-size:12.8000001907349px">I am working on a Python script using PyMVPA to read in FreeSurfer recon-all processed data and run a surface-based searchlight analysis. I am running into some problems both with running the searchlight and returning the resulting dataset to the original NIftI space. I've seen some questions about this on the mailing list but there have been no answers to those sharing my exact error messages.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">This is the link to my script on github:</div><div style="font-size:12.8000001907349px"><a href="https://github.com/jbaublitz/somerslab-mvpa-wrapper/blob/master/surface_searchlight.py" target="_blank">https://github.com/jbaublitz/somerslab-mvpa-wrapper/blob/master/surface_searchlight.py</a><br></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">This script gives me a warning and an error. The warning happens while actually running the searchlight and it is:</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px"><div>WARNING: Detected incorrect (nan) scl_ fields. Resetting to scl_slope=1.0 and scl_inter=0.0</div><div> * Please note: warnings are printed only once, but underlying problem might occur many times *</div></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">The error happens while using map2nifti to map the data back to NIftI space and that is:</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">ValueError: shape mismatch: value array of shape (1,112320) could not be broadcast to indexing result of shape (14166,1)<br></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I have played around with a number of different tweaks to try to get at the problem but I can't seem to get around either of these issues. These include:</div><div style="font-size:12.8000001907349px">1. Specifying the imghdr in map2nifti</div><div style="font-size:12.8000001907349px">2. Using the mapper from the original dataset and samples from the searchlight-processed data</div><div style="font-size:12.8000001907349px">3. Following both the tutorial on the surface and volume-based searchlight</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Also of note is that it WILL save the dataset in a SUMA-readable format but SUMA errors out while trying to load it at the first line of the file header which seems to be malformed. Any ideas?</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Thanks,</div><div style="font-size:12.8000001907349px">John</div></div>