This is an automated email from the git hooks/post-receive script. yoh pushed a commit to annotated tag v0.2 in repository python-mne.
commit f2fb34d8245012493ffe384685ef9a9c2acf39e1 Author: Alexandre Gramfort <[email protected]> Date: Thu Oct 6 14:38:17 2011 -0400 ENH : first start on volume based source estimates --- mne/minimum_norm/inverse.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/mne/minimum_norm/inverse.py b/mne/minimum_norm/inverse.py index 1898a2e..6f31da0 100644 --- a/mne/minimum_norm/inverse.py +++ b/mne/minimum_norm/inverse.py @@ -418,7 +418,10 @@ def _assemble_kernel(inv, label, dSPM): src = inv['src'] lh_vertno = src[0]['vertno'] - rh_vertno = src[1]['vertno'] + if len(src) > 1: + rh_vertno = src[1]['vertno'] + else: + rh_vertno = np.array([]) if label is not None: lh_vertno, rh_vertno, src_sel = _get_label_sel(label, inv) @@ -474,7 +477,10 @@ def _make_stc(sol, tmin, tstep, lh_vertno, rh_vertno): def _get_label_sel(label, inv): src = inv['src'] lh_vertno = src[0]['vertno'] - rh_vertno = src[1]['vertno'] + if len(src) > 1: + rh_vertno = src[1]['vertno'] + else: + rh_vertno = np.array([]) if label['hemi'] == 'lh': vertno_sel = np.intersect1d(lh_vertno, label['vertices']) @@ -544,7 +550,13 @@ def apply_inverse(evoked, inverse_operator, lambda2, dSPM=True, tstep = 1.0 / evoked.info['sfreq'] tmin = float(evoked.first) / evoked.info['sfreq'] src = inv['src'] - stc = _make_stc(sol, tmin, tstep, src[0]['vertno'], src[1]['vertno']) + lh_vertno = src[0]['vertno'] + if len(src) > 1: + rh_vertno = src[1]['vertno'] + else: + rh_vertno = np.array([]) + + stc = _make_stc(sol, tmin, tstep, lh_vertno, rh_vertno) print '[done]' return stc -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-mne.git _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
