Today is the first official day of the GSoC coding period.
I'm continuing my analysis of the SPM faces dataset. Last
time, I had run into an issue using the MNE command line
tools. It turns out that the analysis that I completed was
sufficient to run the following example
MNE-python plot spm faces dataset
Alex was kind enough to point out the complete bash script
used to generate the prerequisite files.
With that out of the way, I successfully ran the SPM example.
Next step, subcortical source localization.
As an intermediate step, I'll generate a volume source
space of the whole brain and run a dSPM to get the activity
across the entire volume.
Of course, one of the obstacles I encountered today was
reading the event data in the SPM dataset. I couldn't find
the trigger channel information, but the SPM MEG data comes
with Matlab .mat files with events. Reading these into
Python was surprisingly straightforward.
from scipy import io
data_path = '/data/users/alanData/SPM-face'
fname_events = data_path + '/MEG/trials_run1.mat'
events = io.loadmat(fname_events)
events ends up being a dictionary, but the keys
'conditionlabels' and 'trl' give us the event types and
time arrays, respectively.
To set up the volume source space, I use the following ...
import mne
fname_mri = data_path + '/subjects/spm/mri/brain.mgz'
src = mne.setup_volume_source_space('spm', mri=fname_mri)
Which ran without any errors, although I have a feeling
I'm going to need to tweek these parameters later.
Tomorrow, I finish up the dSPM example for the SPM data.
No comments:
Post a Comment