@testing.requires_testing_data
def test_make_field_map_eeg():
    'Test interpolation of EEG field onto head.'
    evoked = read_evokeds(evoked_fname, condition='Left Auditory')
    evoked.info['bads'] = ['MEG 2443', 'EEG 053']
    surf = get_head_surf('sample', subjects_dir=subjects_dir)
    pytest.raises(ValueError, _make_surface_mapping, evoked.info, surf, 'eeg')
    evoked.pick_types(meg=False, eeg=True)
    fmd = make_field_map(evoked, trans_fname, subject='sample', subjects_dir=subjects_dir)
    pytest.raises(RuntimeError, make_field_map, evoked, None, subject='sample', subjects_dir=subjects_dir)
    fmd = make_field_map(evoked, trans_fname, subject='sample', subjects_dir=subjects_dir)
    assert (len(fmd) == 1)
    assert_array_equal(fmd[0]['data'].shape, (642, 59))
    assert (len(fmd[0]['ch_names']) == 59)
Test interpolation of EEG field onto head.
@testing.requires_testing_data
def test_make_field_map_eeg():
    
    evoked = read_evokeds(evoked_fname, condition='Left Auditory')
    evoked.info['bads'] = ['MEG 2443', 'EEG 053']
    surf = get_head_surf('sample', subjects_dir=subjects_dir)
    pytest.raises(ValueError, _make_surface_mapping, evoked.info, surf, 'eeg')
    evoked.pick_types(meg=False, eeg=True)
    fmd = make_field_map(evoked, trans_fname, subject='sample', subjects_dir=subjects_dir)
    pytest.raises(RuntimeError, make_field_map, evoked, None, subject='sample', subjects_dir=subjects_dir)
    fmd = make_field_map(evoked, trans_fname, subject='sample', subjects_dir=subjects_dir)
    assert (len(fmd) == 1)
    assert_array_equal(fmd[0]['data'].shape, (642, 59))
    assert (len(fmd[0]['ch_names']) == 59)