This is an automated email from the git hooks/post-receive script. yoh pushed a commit to annotated tag v0.1 in repository python-mne.
commit f627fa2cf1d0733cd42f65d1f38fdb19f95f3a2b Author: Alexandre Gramfort <[email protected]> Date: Mon Jan 24 16:17:09 2011 -0500 fix bug to allow loading of any evoked data set --- examples/plot_compute_mne_inverse.py | 2 +- examples/plot_read_evoked.py | 7 ++----- mne/fiff/evoked.py | 4 ++-- mne/inverse.py | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/examples/plot_compute_mne_inverse.py b/examples/plot_compute_mne_inverse.py index 6591c76..45500ed 100644 --- a/examples/plot_compute_mne_inverse.py +++ b/examples/plot_compute_mne_inverse.py @@ -35,7 +35,7 @@ res = mne.compute_inverse(fname_data, setno, fname_inv, lambda2, dSPM, lh_vertices = res['inv']['src'][0]['vertno'] rh_vertices = res['inv']['src'][1]['vertno'] lh_data = res['sol'][:len(lh_vertices)] -rh_data = res['sol'][len(rh_vertices):] +rh_data = res['sol'][-len(rh_vertices):] # Save result in stc files mne.write_stc('mne_dSPM_inverse-lh.stc', tmin=res['tmin'], tstep=res['tstep'], diff --git a/examples/plot_read_evoked.py b/examples/plot_read_evoked.py index e9fb426..f48e5e5 100644 --- a/examples/plot_read_evoked.py +++ b/examples/plot_read_evoked.py @@ -17,15 +17,12 @@ fname = os.environ['MNE_SAMPLE_DATASET_PATH'] fname += '/MEG/sample/sample_audvis-ave.fif' # Reading -data = fiff.read_evoked(fname, baseline=(None, 0)) - -# Writing -fiff.write_evoked('evoked.fif', data) +data = fiff.read_evoked(fname, setno=0, baseline=(None, 0)) ############################################################################### # Show result - import pylab as pl +pl.clf() pl.subplot(3, 1, 1) pl.plot(data['evoked']['times'], data['evoked']['epochs'][0:306:3,:].T) pl.title('Planar Gradiometers') diff --git a/mne/fiff/evoked.py b/mne/fiff/evoked.py index 04966e6..dcfc879 100644 --- a/mne/fiff/evoked.py +++ b/mne/fiff/evoked.py @@ -74,7 +74,7 @@ def read_evoked(fname, setno=0, baseline=None): if is_smsh is None: is_smsh = np.zeros((1, sets[k]['naspect'])) else: - is_smsh = np.c_[is_smsh, np.zeros((1, sets[k]['naspect']))] + is_smsh = np.r_[is_smsh, np.zeros((1, sets[k]['naspect']))] naspect += sets[k]['naspect'] saspects = dir_tree_find(evoked[k], FIFF.FIFFB_SMSH_ASPECT) @@ -82,7 +82,7 @@ def read_evoked(fname, setno=0, baseline=None): if nsaspects > 0: sets[k]['naspect'] += nsaspects sets[k]['naspect'] = [sets[k]['naspect'], saspects] # XXX : potential bug - is_smsh = np.c_[is_smsh, np.ones(1, sets[k]['naspect'])] + is_smsh = np.r_[is_smsh, np.ones(1, sets[k]['naspect'])] naspect += nsaspects print '\t%d evoked data sets containing a total of %d data aspects' \ diff --git a/mne/inverse.py b/mne/inverse.py index 197e6fc..3a22873 100644 --- a/mne/inverse.py +++ b/mne/inverse.py @@ -315,7 +315,7 @@ def prepare_inverse_operator(orig, nave, lambda2, dSPM): # # Create the diagonal matrix for computing the regularized inverse # - inv['reginv'] = inv['sing'] / (inv['sing'] * inv['sing'] + lambda2) + inv['reginv'] = inv['sing'] / (inv['sing']**2 + lambda2) print '\tCreated the regularized inverter' # # Create the projection operator -- 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
