コード例 #1
0
def test_mxne_inverse():
    """Test MxNE inverse computation"""
    alpha = 60  # spatial regularization parameter

    stc_prox = mixed_norm(
        evoked_l21, forward, cov, alpha, loose=None, depth=0.9, maxit=1000, tol=1e-8, active_set_size=10, solver="prox"
    )
    stc_cd = mixed_norm(
        evoked_l21, forward, cov, alpha, loose=None, depth=0.9, maxit=1000, tol=1e-8, active_set_size=10, solver="cd"
    )
    assert_array_almost_equal(stc_prox.times, evoked_l21.times, 5)
    assert_array_almost_equal(stc_cd.times, evoked_l21.times, 5)
    assert_array_almost_equal(stc_prox.data, stc_cd.data, 5)
    assert_true(stc_prox.vertno[1][0] in label.vertices)
    assert_true(stc_cd.vertno[1][0] in label.vertices)

    stc, _ = mixed_norm(
        evoked_l21,
        forward,
        cov,
        alpha,
        loose=None,
        depth=depth,
        maxit=500,
        tol=1e-4,
        active_set_size=10,
        weights=stc_dspm,
        weights_min=weights_min,
        return_residual=True,
    )

    assert_array_almost_equal(stc.times, evoked_l21.times, 5)
    assert_true(stc.vertno[1][0] in label.vertices)
コード例 #2
0
ファイル: test_inverse.py プロジェクト: starzynski/mne-python
def test_MxNE_inverse():
    """Test MxNE inverse computation"""
    alpha = 60  # spatial regularization parameter
    stc = mixed_norm(evoked, forward, cov, alpha, loose=None, depth=0.9,
                     maxit=500, tol=1e-4, active_set_size=10)

    assert_array_almost_equal(stc.times, evoked.times, 5)
    assert_true(stc.vertno[1][0] in label.vertices)
コード例 #3
0
def test_MxNE_inverse():
    """Test MxNE inverse computation"""
    alpha = 60  # spatial regularization parameter
    stc = mixed_norm(evoked,
                     forward,
                     cov,
                     alpha,
                     loose=None,
                     depth=0.9,
                     maxit=500,
                     tol=1e-4,
                     active_set_size=10)

    assert_array_almost_equal(stc.times, evoked.times, 5)
    assert_true(stc.vertno[1][0] in label.vertices)