@testing.requires_testing_data
def test_plot_source_spectrogram():
 sample_src = read_source_spaces(op.join(subjects_dir, 'sample', 'bem', 'sample-oct-6-src.fif'))
 vertices = [s['vertno'] for s in sample_src]
 n_times = 5
 n_verts = sum((len(v) for v in vertices))
 stc_data = np.ones((n_verts, n_times))
 stc = SourceEstimate(stc_data, vertices, 1, 1)
 plot_source_spectrogram([stc, stc], [[1, 2], [3, 4]])
 assert_raises(ValueError, plot_source_spectrogram, [], [])
 assert_raises(ValueError, plot_source_spectrogram, [stc, stc], [[1, 2], [3, 4]], tmin=0)
 assert_raises(ValueError, plot_source_spectrogram, [stc, stc], [[1, 2], [3, 4]], tmax=7)

@ testing . requires_testing_data def test_plot_source_spectrogram ( ) : sample_src = read_source_spaces ( op . join ( subjects_dir , 'sample' , 'bem' , 'sample-oct-6-src.fif' ) ) vertices = [ s [ 'vertno' ] for s in sample_src ] n_times = 5 n_verts = sum ( ( len ( v ) for v in vertices ) ) stc_data = np . ones ( ( n_verts , n_times ) ) stc = SourceEstimate ( stc_data , vertices , 1 , 1 ) plot_source_spectrogram ( [ stc , stc ] , [ [ 1 , 2 ] , [ 3 , 4 ] ] ) assert_raises ( ValueError , plot_source_spectrogram , [ ] , [ ] ) assert_raises ( ValueError , plot_source_spectrogram , [ stc , stc ] , [ [ 1 , 2 ] , [ 3 , 4 ] ] , tmin = 0 ) assert_raises ( ValueError , plot_source_spectrogram , [ stc , stc ] , [ [ 1 , 2 ] , [ 3 , 4 ] ] , tmax = 7 )
test plotting of source spectrogram .