With help and a new mne_volume_source_space binary from Junpeng Zhang,
run_meg_volume_tutorial.sh finishes and produces the desired files, namely *
sample_audvis-meg-vol-7-meg-inv.fif*.
I haven't had much success diving into the code, but from what I gather the
fiff file(?) as explored by fiff/tree.py and fiff/tag.py does not include
the tag for the parent MRI (FIFFB_MNE_PARENT_MRI_FILE=353).
Is there a way to confirm this?
Can a fiff file be easily modified to include it or is there a way to get
python to look in a default location
(environ['SUBJECT_DIR']/environ['SUBJECT']/MRI/
)?
I had the same problem using 2.7.3-3268 and mne-python v 0.3-1 with my
data, although it worked fine with the sample dataset.
After switching to 2.7.4-3357, the sample dataset still works, but with my
own data now I get an error about the MRI RAS transformation matrix:
File
"/na/homes/jhouck/.local/lib/python2.6/site-packages/mne-0.3-py2.6.egg/mne/source_estimate.py",
line 799, in save_stc_as_volume
affine = np.dot(src[0]['mri_ras_t']['trans'], affine)
KeyError: 'mri_ras_t'
I checked with mne_collect_transforms and this transform was present in all
of the MRI sets for my subject, as well as in talairach.xfm, but not in
T1.mgz. I applied it to that file using mri_add_xform_to_header but still
see the same error. Does that transfomation matrix need to exist in T1.mgz
before the source space and inverse solution are made?
The sample data has transforms for both MRI (surface RAS) -> head and MRI
(surface RAS) -> RAS (non-zero origin); my file had only MRI (surface RAS)
-> head. Re-running the MRI processing steps using 2.7.4 (from
mne_setup_source_space onward) added this tranformation, and a
slightly-modified version of the sample code gives me reasonable output in
volume source space. Thanks!