firing_rate_map

Contents

firing_rate_map#

class braintools.visualize.firing_rate_map(rates, positions=None, grid_size=None, cmap='hot', interpolation='bilinear', ax=None, figsize=(8, 8), show_colorbar=True, title=None, **kwargs)#

Create a 2D firing rate map.

Parameters:
  • rates (ndarray) – Firing rates. Can be 2D array or 1D array with positions.

  • positions (ndarray | None) – Positions corresponding to rates (N, 2) for 1D rates.

  • grid_size (Tuple[int, int] | None) – Size of the grid for 1D rates with positions.

  • cmap (str) – Colormap for the rate map.

  • interpolation (str) – Interpolation method for display.

  • ax (Axes | None) – Axes to plot on.

  • figsize (Tuple[float, float]) – Figure size if creating new figure.

  • show_colorbar (bool) – Whether to show colorbar.

  • title (str | None) – Plot title.

  • **kwargs – Additional arguments passed to imshow.

Returns:

ax – The axes object containing the plot.

Return type:

Axes