replay_trajectory_classification.environments.get_track_boundary#

get_track_boundary(is_track_interior: ndarray, n_position_dims: int = 2, connectivity: int = 1) ndarray[source]#

Determines the boundary of the valid interior track bins. The boundary are not bins on the track but surround it.

Parameters:
  • is_track_interior (np.ndarray, shape (n_bins_x, n_bins_y))

  • n_position_dims (int)

  • connectivity (int) – connectivity determines which elements of the output array belong to the structure, i.e., are considered as neighbors of the central element. Elements up to a squared distance of connectivity from the center are considered neighbors. connectivity may range from 1 (no diagonal elements are neighbors) to rank (all elements are neighbors).

Returns:

is_track_boundary

Return type:

np.ndarray, shape (n_bins,)