@testing.requires_testing_data
def test_make_inverse_operator_free():
 fwd_op = read_forward_solution_meg(fname_fwd, surf_ori=True)
 fwd_1 = read_forward_solution_meg(fname_fwd, surf_ori=False, force_fixed=False)
 fwd_2 = read_forward_solution_meg(fname_fwd, surf_ori=False, force_fixed=True)
 evoked = _get_evoked()
 noise_cov = read_cov(fname_cov)
 assert_raises(ValueError, make_inverse_operator, evoked.info, fwd_2, noise_cov, depth=None)
 inv_1 = make_inverse_operator(evoked.info, fwd_op, noise_cov, loose=None)
 inv_2 = make_inverse_operator(evoked.info, fwd_op, noise_cov, loose=1)
 _compare_inverses_approx(inv_1, inv_2, evoked, 0, 0.01)
 inv_3 = make_inverse_operator(evoked.info, fwd_op, noise_cov, depth=None, loose=None)
 inv_4 = make_inverse_operator(evoked.info, fwd_1, noise_cov, depth=None, loose=None)
 _compare_inverses_approx(inv_3, inv_4, evoked, 0, 0.01)

@ testing . requires_testing_data def test_make_inverse_operator_free ( ) : fwd_op = read_forward_solution_meg ( fname_fwd , surf_ori = True ) fwd_1 = read_forward_solution_meg ( fname_fwd , surf_ori = False , force_fixed = False ) fwd_2 = read_forward_solution_meg ( fname_fwd , surf_ori = False , force_fixed = True ) evoked = _get_evoked ( ) noise_cov = read_cov ( fname_cov ) assert_raises ( ValueError , make_inverse_operator , evoked . info , fwd_2 , noise_cov , depth = None ) inv_1 = make_inverse_operator ( evoked . info , fwd_op , noise_cov , loose = None ) inv_2 = make_inverse_operator ( evoked . info , fwd_op , noise_cov , loose = 1 ) _compare_inverses_approx ( inv_1 , inv_2 , evoked , 0 , 0.01 ) inv_3 = make_inverse_operator ( evoked . info , fwd_op , noise_cov , depth = None , loose = None ) inv_4 = make_inverse_operator ( evoked . info , fwd_1 , noise_cov , depth = None , loose = None ) _compare_inverses_approx ( inv_3 , inv_4 , evoked , 0 , 0.01 )
test mne inverse computation .