spike_gui module¶
-
class
opeth.spike_gui.
SpikeEvalGui
(sample_rate)¶ Bases:
object
Spike evaluation plots for a given channel.
Three main areas: top part is a full timeline plot displaying the original signal with the detected spikes overlayed in different color, and the bottom part is a per-spike grid of plots displaying the detected spikes individually. On the right side parameters can be adjusted.
GUI initialization
-
spikeplotpool
¶ List of plots in the grid (not used)
Type: list
-
spikeplotcurves
¶ Spike waveforms in
spikeplotpool
used for setDataType: list
-
spikeplotpositions
¶ Marker for the detected threshold crossing
Type: list
-
spikerawcurves
¶ Curves to overlay the top display with the color of specific spikes
Type: list
-
spikeplotpool_next
¶ Index of current spike in the given round of plots (for color and plot window cycling)
Type: int
-
COLORS
= ['1f78b4', 'b2df8a', '33a02c', 'fb9a99', 'e31a1c', 'fdbf6f', 'ff7f00', 'cab2d6', 'a6cee3']¶
-
MAX_PLOT_PER_SEC
= 5¶ Continuous spike window refresh rate (if “Update only on spike” not selected)
-
NOF_SPIKEPLOTS
= 9¶ Bottom spike window grid settings
-
NOF_SPIKEPLOTS_PER_ROW
= 3¶ Bottom spike window grid settings
-
PENWIDTH
= 2¶ Plot draw width
-
SPIKE_ROI_AFTER
= 0.001¶ in seconds after peak of spike
Type: Bottom display limit
-
SPIKE_ROI_BEFORE
= 0.0003¶ in seconds before peak of spike
Type: Bottom display limit
-
close
()¶ Called when main window is closed.
-
earliest_plot
= None¶ timestamp until new plot is created to limit update frequency
-
plot
(data_ts, data, spike_ts, spike_pos, threshold_levels)¶ Plot a set of data and corresponding spikes on the selected channel.
Parameters: - data_ts – timestamps
- data – data to plot - only the selected channel will be plotted
- spike_ts – timestamps where spikes were detected by
colldata.DataProc.spikedetect()
. - spike_pos – spike positions as detected by
colldata.DataProc.spikedetect()
. - threshold_levels – per channel threshold level for plotting
-
set_sampling_rate
(sampling_rate)¶
-