

@testing.requires_testing_data
def test_apply_mne_inverse_fixed_raw():
    'Test MNE with fixed-orientation inverse operator on Raw\n    '
    raw = Raw(fname_raw)
    start = 3
    stop = 10
    (_, times) = raw[0, start:stop]
    label_lh = read_label((fname_label % 'Aud-lh'))
    fwd = read_forward_solution_meg(fname_fwd, force_fixed=False, surf_ori=True)
    noise_cov = read_cov(fname_cov)
    inv_op = make_inverse_operator(raw.info, fwd, noise_cov, loose=None, depth=0.8, fixed=True)
    inv_op2 = prepare_inverse_operator(inv_op, nave=1, lambda2=lambda2, method='dSPM')
    stc = apply_inverse_raw(fwd, inv_op2, lambda2, 'dSPM', label=label_lh, start=start, stop=stop, nave=1, pick_ori=None, buffer_size=None, prepared=True)
    stc2 = apply_inverse_raw(raw, inv_op2, lambda2, 'dSPM', label=label_lh, start=start, stop=stop, nave=1, pick_ori=None, buffer_size=3, prepared=True)
    stc3 = apply_inverse_raw(raw, inv_op, lambda2, 'dSPM', label=label_lh, start=start, stop=stop, nave=1, pick_ori=None, buffer_size=None)
    assert_true((stc.subject == 'sample'))
    assert_true((stc2.subject == 'sample'))
    assert_array_almost_equal(stc.times, times)
    assert_array_almost_equal(stc2.times, times)
    assert_array_almost_equal(stc3.times, times)
    assert_array_almost_equal(stc.data, stc2.data)
    assert_array_almost_equal(stc.data, stc3.data)

dataset/ETHPy150Open mne-tools/mne-python/mne/minimum_norm/tests/test_inverse.py test_apply_mne_inverse_fixed_raw/VarMisuse@127/208 `raw`->`fwd`