Plot activity within a frequency band on the subject's brain.
(kind, band)
| 183 | |
| 184 | |
| 185 | def plot_band(kind, band): |
| 186 | """Plot activity within a frequency band on the subject's brain.""" |
| 187 | lf, hf = freq_bands[band] |
| 188 | title = f"{titles[kind]} {band}\n({lf:d}-{hf:d} Hz)" |
| 189 | topos[kind][band].plot_topomap( |
| 190 | times=0.0, |
| 191 | scalings=1.0, |
| 192 | cbar_fmt="%0.1f", |
| 193 | vlim=(0, None), |
| 194 | cmap="inferno", |
| 195 | time_format=title, |
| 196 | ) |
| 197 | brain = stcs[kind][band].plot( |
| 198 | subject=subject, |
| 199 | subjects_dir=subjects_dir, |
| 200 | views="cau", |
| 201 | hemi="both", |
| 202 | time_label=title, |
| 203 | title=title, |
| 204 | colormap="inferno", |
| 205 | time_viewer=False, |
| 206 | show_traces=False, |
| 207 | clim=dict(kind="percent", lims=(70, 85, 99)), |
| 208 | smoothing_steps=10, |
| 209 | ) |
| 210 | brain.show_view(azimuth=0, elevation=0, roll=0) |
| 211 | return fig, brain |
| 212 | |
| 213 | |
| 214 | fig_alpha, brain_alpha = plot_band("vv", "alpha") |
no test coverage detected