coco_pipe.viz.topo#
Montage-based topographic helpers.
Channel-name-driven scalp topomaps that need only a list of channel names and
values (no recording Info): a single static map, an interactive selector
across several maps, and a predicate that gates topomaps to genuine sensor
axes. Positions are resolved from a standard MNE montage via
coco_pipe.viz.info_from_montage().
Attributes#
Functions#
|
Return the lower-cased channel names of a standard MNE montage. |
|
Return |
|
Topomap plotting without a raw object (uses standard montage). |
|
Interactive selector over MNE-rendered topomaps. |
Module Contents#
- coco_pipe.viz.topo.LOGGER#
- coco_pipe.viz.topo.standard_montage_channels(montage='colin27_1020')#
Return the lower-cased channel names of a standard MNE montage.
- coco_pipe.viz.topo.feature_names_are_channels(feature_names, channels=None, *, montage='colin27_1020')#
Return
Truewhen every feature name is a known montage channel.Used to gate scalp topomaps of component loadings: a topomap is only meaningful when the feature axis is the sensor montage (e.g. raw sensor-space input), not when features are
band-by-channeldescriptors flattened into composite names. When channels isNonethe vocabulary defaults to the full standard montage (which carries both legacy and modern 10-20 names); callers pass their own list to restrict the gate to a specific subset or to accept non-standard channel names.- Parameters:
feature_names (collections.abc.Sequence[str] | None)
channels (collections.abc.Sequence[str] | None)
montage (str)
- Return type:
- coco_pipe.viz.topo.plot_topomap_from_channel_values(channel_names, values, title, cmap='viridis', unit=None, bad_channels=None, *, montage='colin27_1020')#
Topomap plotting without a raw object (uses standard montage).
- Parameters:
channel_names (collections.abc.Sequence[str]) – List of channel names.
values (collections.abc.Sequence[float]) – Values to plot (one per channel).
title (str) – Figure title.
cmap (str) – Colormap name.
unit (str | None) – Optional unit for colorbar label.
bad_channels (list[str] | None) – Optional list of channels to mark with an ‘X’.
montage (str) – Standard MNE montage used to resolve electrode positions.
- Return type:
matplotlib.pyplot.Figure | None
- coco_pipe.viz.topo.plot_topomap_selector(value_maps, title, unit=None)#
Interactive selector over MNE-rendered topomaps.
- Parameters:
value_maps (dict[str, tuple[collections.abc.Sequence[str], collections.abc.Sequence[float]]])
title (str)
unit (str | None)
- Return type:
plotly.graph_objects.Figure | None