neuralib.rastermap.plot.RasterMapPlot

class neuralib.rastermap.plot.RasterMapPlot[source]

Bases: object

Plot the rastermap result with behavioral measurements

__init__(result, act_time, time_range=None, covars=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

Methods

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

plot_rastermap([figsize, event_colors, output])

plot_segments(ax[, event_colors])

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

super_neurons

rastermap sorted 2D array.

__init__(result, act_time, time_range=None, covars=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

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(figsize=(8, 6), event_colors=None, output=None)[source]
Parameters:
  • figsize (tuple[float, float])

  • event_colors (dict[str, str] | None)

  • output (str | Path | PathLike[str] | None)

plot_segments(ax, event_colors=None)[source]

Plot event segments as vertical spans on the axis

Parameters:
  • ax (Axes) – matplotlib Axes object

  • event_colors (dict[str, str] | None) – optional mapping from event names to colors