TopoPlotViewer¶
Plot EEG channels (electrodes) or NIRS channels (sources and detectors as discs, source-detector channels as lines) on a head outline, with colors based on the values in the incoming data.
Optionally interpolate the values between channels (with or without contour lines). If the incoming values are discrete (i.e., using the Discretize node before this node), you can assign a fixed color to each value. If the values are continuous, you can select the colormap to assign colors to the values. This node expects the data to be a vector of channels, i.e., Space axis only, with any other axes (Time, Feature, Frequency, etc.) having been reduced prior to this node (i.e., use Mean followed by StripSingletonAxis). This node will work with streaming or non-streaming ("offline") data, however the interpolation feature may be too slow for real-time use. Version 1.4.1
Ports/Properties¶
data¶
Data to display.
- verbose name: Data
- default value: None
- port type: DataPort
- value type: Packet (can be None)
- data direction: IN
figure_out¶
Plot data for PlotDashboard (TopoPlotData when suppress_window is enabled).
- verbose name: Figure Out
- default value: None
- port type: DataPort
- value type: object (can be None)
- data direction: OUT
plot_values¶
Array of pixel values.
- verbose name: Plot Values
- default value: None
- port type: DataPort
- value type: object (can be None)
- data direction: OUT
modality¶
Modality of the data. If set to 'NIRS', the channels are plotted between the source and detector optodes. If 'EEG' or 'other', the channels are the electrodes themselves. If set to 'auto', the modality will be inferred from the data if specified, and 'other' is used if not.
- verbose name: Modality
- default value: auto
- port type: EnumPort
- value type: str (can be None)
interpolation¶
Whether to interpolate the electrode values across the topoplot. "none" performs no interpolation, "map" performs an interpolation and "contour" adds contour lines to the interpolation. This setting is ignored if modality is "NIRS" (since that plots lines rather than electrodes).
- verbose name: Interpolation
- default value: none
- port type: EnumPort
- value type: str (can be None)
plot_disks¶
Plot the electrodes (channels) as disks.
- verbose name: Plot Disks
- default value: True
- port type: BoolPort
- value type: bool (can be None)
disk_scale¶
Data scaling factor that determines the size of the electrode (channel) disks.
- verbose name: Disk Scale
- default value: 250
- port type: FloatPort
- value type: float (can be None)
head_option¶
Plot the head outline.
- verbose name: Plot Head
- default value: True
- port type: BoolPort
- value type: bool (can be None)
head_line_width¶
Line width used for head, nose, ears outline.
- verbose name: Head Line Width
- default value: 2
- port type: IntPort
- value type: int (can be None)
head_ring_width¶
Width of the blank ring around the head (nose, ears and outer electrodes are plotted outside this ring.
- verbose name: Head Ring Width
- default value: 0.01
- port type: FloatPort
- value type: float (can be None)
head_axes_scfac¶
Head to axes scaling factor.
- verbose name: Head-Axes Scaling Factor
- default value: 1.3
- port type: FloatPort
- value type: float (can be None)
head_rad¶
Drawing radius (arc_length) for the head outline. Note that only a value of 0.5 reflects the conventional projection, so normally you should not change this value.
- verbose name: Head Radius
- default value: 0.5
- port type: FloatPort
- value type: float (can be None)
plot_rad¶
Maximum radius of channels to be plotted. If this value is greater than the head radius , channels which falls outside the head radius (i.e. below ears/eyes) will plotted in a circular 'skirt' outside the head outline; if it is equal to or smaller than the head radius, those channels falling outside the head radius will not be plotted. If None, this will be set to a value that includes the channels furthest from the head center, multiplied by the head_padding_scale.
- verbose name: Plot Radius
- default value: None
- port type: FloatPort
- value type: float (can be None)
padding_scale¶
If the plot radius is not specified, this value is used to scale the interpolation radius based on the outermost channels in the data, "padding" the distance between the head outline and the plot limits.
- verbose name: Padding Scale
- default value: 1.075
- port type: FloatPort
- value type: float (can be None)
num_contours¶
Number of contour lines to draw. This setting is only relevant if interpolation is set to "contour".
- verbose name: Num Contours
- default value: 6
- port type: IntPort
- value type: int (can be None)
contour_line_width¶
Width of the contour lines. This setting is only relevant if interpolation is set to "contour".
- verbose name: Contour Line Width
- default value: 0.6
- port type: FloatPort
- value type: float (can be None)
color_range_cont¶
Color map for continuous-valued plots.
- verbose name: Color Range (Continuous-Valued)
- default value: RdYlGn
- port type: EnumPort
- value type: str (can be None)
color_range¶
Color levels for discrete-valued plots.
- verbose name: Color Range (Discrete-Valued)
- default value: ['red', 'green']
- port type: ListPort
- value type: list (can be None)
background_color¶
Background color
- verbose name: Background Color
- default value: white
- port type: StringPort
- value type: str (can be None)
head_color¶
Head outline color.
- verbose name: Head Color
- default value: black
- port type: StringPort
- value type: str (can be None)
disk_opacity¶
Opacity of the fill color in the electrode (channel) disks. This will also be used for the color bar if the disks are plotted.
- verbose name: Disk Opacity
- default value: 0.5
- port type: FloatPort
- value type: float (can be None)
contour_line_color¶
Color of the contour lines. This setting is only relevant if interpolation is set to "contour".
- verbose name: Contour Line Color
- default value: black
- port type: StringPort
- value type: str (can be None)
use_custom_colormap¶
Use for statistically thresholded plots. Before using this colormap, you should have masked the data using a p-value threshold. That is, values greater than that p-value threshold are forced to zero, while the original values are retained for the rest.
- verbose name: Statistical Thresholded Colormap
- default value: False
- port type: BoolPort
- value type: bool (can be None)
value_discrete¶
If True, the metric used for electrode values is considered to be discrete, and different levels and colors assigned to each level can be further defined in the value range and color range (discrete-valued) properties.
- verbose name: Value Discrete
- default value: False
- port type: BoolPort
- value type: bool (can be None)
value_range¶
If value_discrete is True, the range includes the allowable levels of the metric. Otherwise, the two element list indicate the values which define the minimum and maximum of the color limits as shown in the color bar. If unspecified, the minimum and maximum values in the data are used.
- verbose name: Value Range
- default value: None
- port type: ListPort
- value type: list (can be None)
title¶
Figure title.
- verbose name: Title
- default value: Topoplot
- port type: StringPort
- value type: str (can be None)
title_font_size¶
Font size (in points) for the figure title.
- verbose name: Title Font Size
- default value: 12
- port type: FloatPort
- value type: float (can be None)
show_labels¶
Show electrode (channel) labels.
- verbose name: Show Labels
- default value: True
- port type: BoolPort
- value type: bool (can be None)
label_size¶
Font size (points) for channel labels.
- verbose name: Label Size
- default value: 8
- port type: IntPort
- value type: int (can be None)
add_colorbar¶
Show a color bar.
- verbose name: Add Colorbar
- default value: True
- port type: BoolPort
- value type: bool (can be None)
color_bar_ticks_values¶
List of the ticks values for the color bar.
- verbose name: Color Bar Ticks Values
- default value: None
- port type: ListPort
- value type: list (can be None)
color_bar_ticks_labels¶
List of the ticks labels for the color bar.
- verbose name: Color Bar Ticks Labels
- default value: None
- port type: ListPort
- value type: list (can be None)
always_on_top¶
Window should be always on top. If this is enabled, then the window will not be occluded by other windows.
- verbose name: Always On Top
- default value: False
- port type: BoolPort
- value type: bool (can be None)
show_toolbar¶
Whether to show the window toolbar.
- verbose name: Show Toolbar
- default value: False
- port type: BoolPort
- value type: bool (can be None)
initial_dims¶
Initial position of the window on the monitor. This is given in pixels, and is formatted as [x, y, width, eight]. If x, y are set to 0 each, then the window will appear in the top left corner of the screen.
- verbose name: Initial Window Position
- default value: [50, 50, 700, 500]
- port type: ListPort
- value type: list (can be None)
canvas_sizes¶
Canvas size for the plot in inches. This is relevant when printing the figure.
- verbose name: Canvas Sizes
- default value: [7, 5.25]
- port type: ListPort
- value type: list (can be None)
canvas_dpi¶
Canvas DPI. Determines print resolution.
- verbose name: Canvas Dpi
- default value: 100
- port type: IntPort
- value type: int (can be None)
exit_on_close¶
Whether to exit the program if the figure is closed.
- verbose name: Exit On Close
- default value: False
- port type: BoolPort
- value type: bool (can be None)
suppress_window¶
Suppress the plot window. When enabled, the figure is rendered off-screen and only output on the figure port, without opening a visible window. Use this when feeding the figure into a Figure Dashboard node.
- verbose name: Suppress Window
- default value: False
- port type: BoolPort
- value type: bool (can be None)
max_redraw_hz¶
Maximum redraw rate of this table in Hz. Limits how often the matplotlib canvas is repainted (and how often a Plot Dashboard re-renders this table panel). 0 means no throttle. Lowering this can significantly reduce visualization overhead where matplotlib.table draws are expensive (i.e., MacOS).
- verbose name: Max Redraw Rate (Hz)
- default value: None
- port type: FloatPort
- value type: float (can be None)
debug_mode¶
Instead of plotting, outputs the interpolated data. This can be used to validate the per-pixel output of the topoplot.
- verbose name: Debug Mode
- default value: False
- port type: BoolPort
- value type: bool (can be None)
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
- verbose name: Set Breakpoint (Debug Only)
- default value: False
- port type: BoolPort
- value type: bool (can be None)
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.
- verbose name: Metadata
- default value: {}
- port type: DictPort
- value type: dict (can be None)