Test plot_surface() for mixed source space.
(renderer_interactive)
| 1358 | @pytest.mark.slowtest # slow-ish on Travis OSX |
| 1359 | @testing.requires_testing_data |
| 1360 | def test_mixed_sources_plot_surface(renderer_interactive): |
| 1361 | """Test plot_surface() for mixed source space.""" |
| 1362 | pytest.importorskip("nibabel") |
| 1363 | src = read_source_spaces(fwd_fname2) |
| 1364 | N = np.sum([s["nuse"] for s in src]) # number of sources |
| 1365 | |
| 1366 | T = 2 # number of time points |
| 1367 | S = 3 # number of source spaces |
| 1368 | |
| 1369 | rng = np.random.RandomState(0) |
| 1370 | data = rng.randn(N, T) |
| 1371 | vertno = S * [np.arange(N // S)] |
| 1372 | |
| 1373 | stc = MixedSourceEstimate(data, vertno, 0, 1) |
| 1374 | |
| 1375 | brain = stc.surface().plot( |
| 1376 | views="lat", |
| 1377 | hemi="split", |
| 1378 | subject="fsaverage", |
| 1379 | subjects_dir=subjects_dir, |
| 1380 | colorbar=False, |
| 1381 | ) |
| 1382 | brain.close() |
| 1383 | del brain |
| 1384 | |
| 1385 | |
| 1386 | @testing.requires_testing_data |
nothing calls this directly
no test coverage detected