Hi Alex,
sorry to keep on pestering but, in trying to grow my label i do the following and get the following result:
# read inverse solution
stc = mne.read_source_estimate(fname_meeg_stc)
# load the anatomical ROI
anat_label1 = mne.labels_from_parc(subject, parc='aparc',
subjects_dir=data_path,
regexp='superiortemporal-rh')[0][0]
# extract the anatomical time course for each label
stc_anat_label1 = stc.in_label(anat_label1)
# calculate center of mass and transform to mni coordinates
vtx, _, t_anat_label1 = stc_anat_label1.center_of_mass(subject)
mni_anat_label1 = mne.vertex_to_mni(vtx, 1, subject)[0]
#make 3mm radius sphere around vertex
anat_label1_sphere=mne.label.grow_labels(subject=subject, seeds=vtx, extents=3.0, hemis=1, subjects_dir=data_path, n_jobs=1)
# extract the vertex-sphere time course for label
stc_anat_label1_sphere=stc.in_label(anat_label1_sphere)
i get the following error:
/home/leitman/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/mne-0.7.1-py2.7.egg/mne/source_estimate.pyc in in_label(self, label)
1089 """
1090 # make sure label and stc are compatible
-> 1091 if label.subject is not None and self.subject is not None \
1092 and label.subject != self.subject:
1093 raise RuntimeError('label and stc must have same subject names, '
AttributeError: 'list' object has no attribute 'subject'
It does not seem that I can add the subject attribute mannually as there is no __dict__ object
so what should I do?
dave