replay_trajectory_classification.environments.get_track_grid#

get_track_grid(track_graph: Graph, edge_order: list[tuple], edge_spacing: float | list, place_bin_size: float) tuple[ndarray, ndarray, ndarray, dict, tuple, tuple, Graph, DataFrame, DataFrame, DataFrame, DataFrame][source]#

Figures out 1D spatial bins given a track graph.

Parameters:
  • track_graph (nx.Graph)

  • edge_order (list of 2-tuples)

  • edge_spacing (list, len n_edges - 1)

  • place_bin_size (float)

Returns:

  • place_bin_centers (np.ndarray, shape (n_bins, n_position_dims))

  • place_bin_edges (np.ndarray, shape (n_bins + n_position_dims, n_position_dims))

  • is_track_interior (np.ndarray, shape (n_bins, n_position_dim))

  • distance_between_nodes (dict)

  • centers_shape (tuple)

  • edges (tuple of np.ndarray)

  • track_graph_with_bin_centers_edges (nx.Graph)

  • original_nodes_df (pd.DataFrame) – Table of information about the original nodes in the track graph

  • place_bin_edges_nodes_df (pd.DataFrame) – Table of information with bin edges and centers

  • place_bin_centers_nodes_df (pd.DataFrame) – Table of information about bin centers

  • nodes_df (pd.DataFrame) – Table of information with information about the original nodes, bin edges, and bin centers