def test_plot_projs_topomap(): """Test plot_projs_topomap.""" projs = read_proj(ecg_fname) info = read_info(raw_fname) fast_test = {"res": 8, "contours": 0, "sensors": False} plot_projs_topomap(projs, info=info, colorbar=True, **fast_test) plt.close('all') ax = plt.subplot(111) projs[3].plot_topomap(info) plot_projs_topomap(projs[:1], info, axes=ax, **fast_test) # test axes plt.close('all') triux_info = read_info(triux_fname) plot_projs_topomap(triux_info['projs'][-1:], triux_info, **fast_test) plt.close('all') plot_projs_topomap(triux_info['projs'][:1], triux_info, **fast_test) plt.close('all') eeg_avg = make_eeg_average_ref_proj(info) eeg_avg.plot_topomap(info, **fast_test) plt.close('all') # test vlims for vlim in ('joint', (-1, 1), (None, 0.5), (0.5, None), (None, None)): plot_projs_topomap(projs[:-1], info, vlim=vlim, colorbar=True) plt.close('all') eeg_proj = make_eeg_average_ref_proj(info) info_meg = pick_info(info, pick_types(info, meg=True, eeg=False)) with pytest.raises(ValueError, match='No channel names in info match p'): plot_projs_topomap([eeg_proj], info_meg)
def test_plot_projs_topomap(): """Test plot_projs_topomap.""" projs = read_proj(ecg_fname) info = read_info(raw_fname) fast_test = {"res": 8, "contours": 0, "sensors": False} plot_projs_topomap(projs, info=info, colorbar=True, **fast_test) plt.close('all') ax = plt.subplot(111) projs[3].plot_topomap() plot_projs_topomap(projs[:1], axes=ax, **fast_test) # test axes param plt.close('all') plot_projs_topomap(read_info(triux_fname)['projs'][-1:], **fast_test) plt.close('all') plot_projs_topomap(read_info(triux_fname)['projs'][:1], **fast_test) plt.close('all') eeg_avg = make_eeg_average_ref_proj(info) pytest.raises(RuntimeError, eeg_avg.plot_topomap) # no layout eeg_avg.plot_topomap(info=info, **fast_test) plt.close('all')
def test_plot_projs_topomap(): """Test plot_projs_topomap.""" projs = read_proj(ecg_fname) info = read_info(raw_fname) fast_test = {"res": 8, "contours": 0, "sensors": False} plot_projs_topomap(projs, info=info, colorbar=True, **fast_test) plt.close('all') ax = plt.subplot(111) projs[3].plot_topomap() plot_projs_topomap(projs[:1], axes=ax, **fast_test) # test axes param plt.close('all') plot_projs_topomap(read_info(triux_fname)['projs'][-1:], **fast_test) plt.close('all') plot_projs_topomap(read_info(triux_fname)['projs'][:1], ** fast_test) plt.close('all') eeg_avg = make_eeg_average_ref_proj(info) pytest.raises(RuntimeError, eeg_avg.plot_topomap) # no layout eeg_avg.plot_topomap(info=info, **fast_test) plt.close('all')
def test_plot_projs_topomap(): """Test plot_projs_topomap.""" import matplotlib.pyplot as plt with warnings.catch_warnings(record=True): # file conventions warnings.simplefilter('always') projs = read_proj(ecg_fname) info = read_info(raw_fname) fast_test = {"res": 8, "contours": 0, "sensors": False} plot_projs_topomap(projs, info=info, colorbar=True, **fast_test) plt.close('all') ax = plt.subplot(111) projs[3].plot_topomap() plot_projs_topomap(projs[:1], axes=ax, **fast_test) # test axes param plt.close('all') plot_projs_topomap(read_info(triux_fname)['projs'][-1:], **fast_test) plt.close('all') plot_projs_topomap(read_info(triux_fname)['projs'][:1], **fast_test) plt.close('all') eeg_avg = make_eeg_average_ref_proj(info) assert_raises(RuntimeError, eeg_avg.plot_topomap) # no layout eeg_avg.plot_topomap(info=info, **fast_test) plt.close('all')
def test_plot_projs_topomap(): """Test plot_projs_topomap.""" import matplotlib.pyplot as plt with warnings.catch_warnings(record=True): # file conventions warnings.simplefilter('always') projs = read_proj(ecg_fname) info = read_info(raw_fname) fast_test = {"res": 8, "contours": 0, "sensors": False} plot_projs_topomap(projs, info=info, colorbar=True, **fast_test) plt.close('all') ax = plt.subplot(111) projs[3].plot_topomap() plot_projs_topomap(projs[:1], axes=ax, **fast_test) # test axes param plt.close('all') plot_projs_topomap(read_info(triux_fname)['projs'][-1:], **fast_test) plt.close('all') plot_projs_topomap(read_info(triux_fname)['projs'][:1], ** fast_test) plt.close('all') eeg_avg = make_eeg_average_ref_proj(info) assert_raises(RuntimeError, eeg_avg.plot_topomap) # no layout eeg_avg.plot_topomap(info=info, **fast_test) plt.close('all')
def test_plot_projs_topomap(): """Test plot_projs_topomap.""" projs = read_proj(ecg_fname) info = read_info(raw_fname) fast_test = {"res": 8, "contours": 0, "sensors": False} plot_projs_topomap(projs, info=info, colorbar=True, **fast_test) plt.close('all') ax = plt.subplot(111) projs[3].plot_topomap(info) plot_projs_topomap(projs[:1], info, axes=ax, **fast_test) # test axes plt.close('all') triux_info = read_info(triux_fname) plot_projs_topomap(triux_info['projs'][-1:], triux_info, **fast_test) plt.close('all') plot_projs_topomap(triux_info['projs'][:1], triux_info, **fast_test) plt.close('all') eeg_avg = make_eeg_average_ref_proj(info) eeg_avg.plot_topomap(info, **fast_test) plt.close('all') # test vlims for vlim in ('joint', (-1, 1), (None, 0.5), (0.5, None), (None, None)): plot_projs_topomap(projs[:-1], info, vlim=vlim, colorbar=True) plt.close('all')