@testing.requires_testing_data
def test_make_inverse_operator_fixed():
 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_1, noise_cov, depth=0.8, loose=None, fixed=True)
 assert_raises(ValueError, make_inverse_operator, evoked.info, fwd_2, noise_cov, depth=0.8, loose=None, fixed=True)
 inv_op = make_inverse_operator(evoked.info, fwd_2, noise_cov, depth=None, loose=None, fixed=True)
 inverse_operator_nodepth = read_inverse_operator(fname_inv_fixed_nodepth)
 _compare_inverses_approx(inverse_operator_nodepth, inv_op, evoked, 0, 0.01)
 assert_true((compute_rank_inverse(inverse_operator_nodepth) == 302))

@ testing . requires_testing_data def test_make_inverse_operator_fixed ( ) : 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_1 , noise_cov , depth = 0.8 , loose = None , fixed = True ) assert_raises ( ValueError , make_inverse_operator , evoked . info , fwd_2 , noise_cov , depth = 0.8 , loose = None , fixed = True ) inv_op = make_inverse_operator ( evoked . info , fwd_2 , noise_cov , depth = None , loose = None , fixed = True ) inverse_operator_nodepth = read_inverse_operator ( fname_inv_fixed_nodepth ) _compare_inverses_approx ( inverse_operator_nodepth , inv_op , evoked , 0 , 0.01 ) assert_true ( ( compute_rank_inverse ( inverse_operator_nodepth ) == 302 ) )
test mne inverse computation .