Esempio n. 1
0
def test_setup_forward_model(tmpdir):
    """Test mne setup_source_space."""
    check_usage(mne_setup_forward_model, force_help=True)
    # Using the sample dataset
    subjects_dir = op.join(testing.data_path(download=False), 'subjects')
    use_fname = op.join(tmpdir, "model-bem.fif")
    # Test  command
    with ArgvSetter(('--model', use_fname, '-d', subjects_dir, '-s', 'sample',
                     '--ico', '3', '--verbose')):
        mne_setup_forward_model.run()
    model = read_bem_surfaces(use_fname)
    assert len(model) == 3
Esempio n. 2
0
def test_setup_forward_model(tmp_path):
    """Test mne setup_forward_model."""
    check_usage(mne_setup_forward_model, force_help=True)
    # Using the sample dataset
    use_fname = op.join(tmp_path, "model-bem.fif")
    # Test  command
    with ArgvSetter(('--model', use_fname, '-d', subjects_dir, '--homog', '-s',
                     'sample', '--ico', '3', '--verbose')):
        mne_setup_forward_model.run()
    model = read_bem_surfaces(use_fname)
    assert len(model) == 1
    sol_fname = op.splitext(use_fname)[0] + '-sol.fif'
    read_bem_solution(sol_fname)