@testing.requires_testing_data
def test_make_inverse_operator_diag():
 evoked = _get_evoked()
 noise_cov = read_cov(fname_cov).as_diag()
 fwd_op = read_forward_solution(fname_fwd, surf_ori=True)
 inv_op = make_inverse_operator(evoked.info, fwd_op, noise_cov, loose=0.2, depth=0.8)
 _compare_io(inv_op)
 inverse_operator_diag = read_inverse_operator(fname_inv_meeg_diag)
 _compare_inverses_approx(inverse_operator_diag, inv_op, evoked, 0, 1.0)
 assert_true((compute_rank_inverse(inverse_operator_diag) == 360))

@ testing . requires_testing_data def test_make_inverse_operator_diag ( ) : evoked = _get_evoked ( ) noise_cov = read_cov ( fname_cov ) . as_diag ( ) fwd_op = read_forward_solution ( fname_fwd , surf_ori = True ) inv_op = make_inverse_operator ( evoked . info , fwd_op , noise_cov , loose = 0.2 , depth = 0.8 ) _compare_io ( inv_op ) inverse_operator_diag = read_inverse_operator ( fname_inv_meeg_diag ) _compare_inverses_approx ( inverse_operator_diag , inv_op , evoked , 0 , 1.0 ) assert_true ( ( compute_rank_inverse ( inverse_operator_diag ) == 360 ) )
test mne inverse computation with diagonal noise cov .