<div dir="ltr">Hi again, <div><br></div><div>I found the mistake. The mask file had incompatible dimensions. The code does work fine.</div><div><br></div><div>Thanks,</div><div><br></div><div>Wolfgang</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 11, 2016 at 3:12 PM, Wolfgang Pauli <span dir="ltr"><<a href="mailto:wolfgang.m.pauli@gmail.com" target="_blank">wolfgang.m.pauli@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, <div><br></div><div>Finally found some time to work with mvpa again. However, despite my impression that I am now decently familiar with pymvpa2, I realized that I can not open and close a file. </div><div><br></div><div>This is what I do:</div><div><br></div><div>dhandle = OpenFMRIDataset(data_path)<br></div><div><div>ds = dhandle.get_model_bold_<wbr>dataset(model_id=1,</div><div>  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  subj_id=subj,</div><div>  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  noinfolabel='rest',</div><div>  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  mask=atlas_mask_file)</div></div><div><div>tmp = map2nifti(ds, data=ds.samples[0])</div><div>tmp.to_filename("one_ds_<wbr>sample.nii.gz")</div></div><div><br></div><div>Shouldn't this work??? The output is complete garbage. The image as the correct dimension, but the data is just frantically smeared all across space.</div><div><div><br></div><div>ds.a.mapper looks good to me:</div><div>ChainMapper(nodes=[<wbr>FlattenMapper(shape=(80, 91, 40), auto_train=True, space='voxel_indices'), StaticFeatureSelection(dshape=<wbr>(291200,), slicearg=array([False, False, False, ..., False, False, False], dtype=bool))])</div></div><div><br></div><div>Thanks!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Wolfgang</div><div><br></div></font></span></div>
</blockquote></div><br></div>