@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)
 assert_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)
 assert_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_true((len(fmd) == 1))
 assert_array_equal(fmd[0]['data'].shape, (642, 59))
 assert_true(len(fmd[0]['ch_names']), 59)

@ 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 ) assert_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 ) assert_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_true ( ( len ( fmd ) == 1 ) ) assert_array_equal ( fmd [ 0 ] [ 'data' ] . shape , ( 642 , 59 ) ) assert_true ( len ( fmd [ 0 ] [ 'ch_names' ] ) , 59 )
test interpolation of eeg field onto head .