replay_trajectory_classification.environments.get_grid#

get_grid(position: ndarray, bin_size: float = 2.5, position_range: list[ndarray] | None = None) tuple[ndarray, ndarray, ndarray, tuple][source]#

Gets the spatial grid of bins.

Parameters:
  • position (np.ndarray, shape (n_time, n_position_dims))

  • bin_size (float, optional) – Maximum size of each position bin.

  • position_range (None or list of np.ndarray) – Use this to define the extent instead of position

Returns:

  • edges (tuple of bin edges, len n_position_dims)

  • place_bin_edges (np.ndarray, shape (n_bins + 1, n_position_dims)) – Edges of each position bin

  • place_bin_centers (np.ndarray, shape (n_bins, n_position_dims)) – Center of each position bin

  • centers_shape (tuple) – Position grid shape