neuralib.model.rastermap.plot.RasterMapPlot

class neuralib.model.rastermap.plot.RasterMapPlot[source]

Bases: object

Plot the rastermap result with behavioral measurements

__init__(result, act_time, time_range=None, covars=None, event_colors=None, output=None)[source]
Parameters:
  • result (RasterMapResult) – class:~.core.RasterMapResult

  • act_time (ndarray) – neural activity time array. should be the same T as neural_activity when run the rastermap

  • time_range (tuple[float, float] | None) – time range for plotting (START,END)

  • covars (list[Covariant] | None) – list of Covariant

  • event_colors (list[str] | None)

  • output (str | Path | bytes | BinaryIO | BufferedIOBase | BufferedReader | None)

Methods

__init__(result, act_time[, time_range, ...])

plot_rastermap()

plot_segments(ax)

Plot event segments as vertical spans on the axis

process_continuous()

process behavioral measurements, select time range and do the interpolation same shape as neural activity

Attributes

DEFAULT_TRIAL_COLORS

super_neurons

rastermap sorted 2D array.

DEFAULT_TRIAL_COLORS = ('royalblue', 'darkorange', 'seagreen', 'crimson')
__init__(result, act_time, time_range=None, covars=None, event_colors=None, output=None)[source]
Parameters:
  • result (RasterMapResult) – class:~.core.RasterMapResult

  • act_time (ndarray) – neural activity time array. should be the same T as neural_activity when run the rastermap

  • time_range (tuple[float, float] | None) – time range for plotting (START,END)

  • covars (list[Covariant] | None) – list of Covariant

  • event_colors (list[str] | None)

  • output (str | Path | bytes | BinaryIO | BufferedIOBase | BufferedReader | None)

property super_neurons: ndarray

rastermap sorted 2D array. Array[float, [N, T]]

process_continuous()[source]

process behavioral measurements, select time range and do the interpolation same shape as neural activity

Return type:

list[Covariant]

plot_rastermap()[source]
plot_segments(ax)[source]

Plot event segments as vertical spans on the axis

Parameters:

ax (Axes) – matplotlib Axes object