@testing.requires_testing_data
def test_inverse_operator_volume():
 tempdir = _TempDir()
 evoked = _get_evoked()
 inverse_operator_vol = read_inverse_operator(fname_vol_inv)
 assert_true(repr(inverse_operator_vol))
 stc = apply_inverse(evoked, inverse_operator_vol, lambda2, 'dSPM')
 assert_true(isinstance(stc, VolSourceEstimate))
 assert_true((stc.subject is None))
 stc.save(op.join(tempdir, 'tmp-vl.stc'))
 stc2 = read_source_estimate(op.join(tempdir, 'tmp-vl.stc'))
 assert_true(np.all((stc.data > 0)))
 assert_true(np.all((stc.data < 35)))
 assert_array_almost_equal(stc.data, stc2.data)
 assert_array_almost_equal(stc.times, stc2.times)

@ testing . requires_testing_data def test_inverse_operator_volume ( ) : tempdir = _TempDir ( ) evoked = _get_evoked ( ) inverse_operator_vol = read_inverse_operator ( fname_vol_inv ) assert_true ( repr ( inverse_operator_vol ) ) stc = apply_inverse ( evoked , inverse_operator_vol , lambda2 , 'dSPM' ) assert_true ( isinstance ( stc , VolSourceEstimate ) ) assert_true ( ( stc . subject is None ) ) stc . save ( op . join ( tempdir , 'tmp-vl.stc' ) ) stc2 = read_source_estimate ( op . join ( tempdir , 'tmp-vl.stc' ) ) assert_true ( np . all ( ( stc . data > 0 ) ) ) assert_true ( np . all ( ( stc . data < 35 ) ) ) assert_array_almost_equal ( stc . data , stc2 . data ) assert_array_almost_equal ( stc . times , stc2 . times )
test mne inverse computation on volume source space .