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 60a879783f4bcf8d901c6efcd065e34eb1fcdc43 Author: Alexandre Gramfort <[email protected]> Date: Wed Oct 26 17:06:53 2011 -0400 TEST : adding test for MNE values around 1 nAm --- mne/minimum_norm/inverse.py | 2 +- mne/minimum_norm/tests/test_inverse.py | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/mne/minimum_norm/inverse.py b/mne/minimum_norm/inverse.py index 1064bcf..e99235d 100644 --- a/mne/minimum_norm/inverse.py +++ b/mne/minimum_norm/inverse.py @@ -310,7 +310,7 @@ def prepare_inverse_operator(orig, nave, lambda2, dSPM): raise ValueError('The number of averages should be positive') print 'Preparing the inverse operator for use...' - inv = orig.copy() + inv = deepcopy(orig) # # Scale some of the stuff # diff --git a/mne/minimum_norm/tests/test_inverse.py b/mne/minimum_norm/tests/test_inverse.py index f60dea1..d5fe27d 100644 --- a/mne/minimum_norm/tests/test_inverse.py +++ b/mne/minimum_norm/tests/test_inverse.py @@ -48,11 +48,23 @@ def test_inverse_operator(): With and without precomputed inverse operator. """ evoked = fiff.Evoked(fname_data, setno=0, baseline=(None, 0)) - stc = apply_inverse(evoked, inverse_operator, lambda2, dSPM) + from copy import deepcopy + + stc = apply_inverse(evoked, inverse_operator, lambda2, dSPM=False) + + assert_true(stc.data.min() > 0) + assert_true(stc.data.max() < 10e-10) + assert_true(stc.data.mean() > 1e-11) + + stc = apply_inverse(evoked, inverse_operator, lambda2, dSPM=True) assert_true(np.all(stc.data > 0)) assert_true(np.all(stc.data < 35)) + assert_true(stc.data.min() > 0) + assert_true(stc.data.max() < 35) + assert_true(stc.data.mean() > 0.1) + # Test MNE inverse computation starting from forward operator noise_cov = Covariance(fname_cov) evoked = fiff.Evoked(fname_data, setno=0, baseline=(None, 0)) -- 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
