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 e9dc6af8175ced44c806c89f0c73638b0c738eb4 Author: Alexandre Gramfort <[email protected]> Date: Mon Jan 24 15:20:38 2011 -0500 adding test for mne inverse computation --- mne/tests/test_epochs.py | 3 ++- mne/tests/test_inverse.py | 25 ++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/mne/tests/test_epochs.py b/mne/tests/test_epochs.py index d01fe1d..cc67544 100644 --- a/mne/tests/test_epochs.py +++ b/mne/tests/test_epochs.py @@ -33,4 +33,5 @@ def test_read_epochs(): include, raw['info']['bads']) data, times, channel_names = mne.read_epochs(raw, events, event_id, - tmin, tmax, picks=picks) + tmin, tmax, picks=picks, + baseline=(None, 0)) diff --git a/mne/tests/test_inverse.py b/mne/tests/test_inverse.py index d65178b..cf71440 100644 --- a/mne/tests/test_inverse.py +++ b/mne/tests/test_inverse.py @@ -1,15 +1,34 @@ import os import os.path as op +import numpy as np from numpy.testing import assert_array_almost_equal, assert_equal import mne MNE_SAMPLE_DATASET_PATH = os.getenv('MNE_SAMPLE_DATASET_PATH') -fname = op.join(MNE_SAMPLE_DATASET_PATH, 'MEG', 'sample', +fname_inv = op.join(MNE_SAMPLE_DATASET_PATH, 'MEG', 'sample', 'sample_audvis-meg-oct-6-meg-inv.fif') +fname_data = op.join(MNE_SAMPLE_DATASET_PATH, 'MEG', 'sample', + 'sample_audvis-ave.fif') -def test_io_forward(): +def test_io_inverse(): """Test IO for inverse operator """ - fwd = mne.read_inverse_operator(fname) + fwd = mne.read_inverse_operator(fname_inv) + +def test_compute_mne_inverse(): + """Test MNE inverse computation + """ + + setno = 0 + snr = 3.0 + lambda2 = 1.0 / snr**2 + dSPM = True + + res = mne.compute_inverse(fname_data, setno, fname_inv, lambda2, dSPM, + baseline=(None, 0)) + + assert np.all(res['sol'] > 0) + assert np.all(res['sol'] < 30) + -- 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
