replay_trajectory_classification.environments.diffuse_each_bin#
- diffuse_each_bin(is_track_interior: np.ndarray, is_track_boundary: np.ndarray, dx: float, dy: float, std: float = 6.0, alpha: float = 0.5) np.ndarray[source]#
For each position bin in the grid, diffuse by std.
- Parameters:
is_track_interior (np.ndarray, shape (n_bins_x, n_bins_y)) – Boolean that denotes which bins that are on the track
is_track_boundary (np.ndarray, shape (n_bins_x, n_bins_y)) – Boolean that denotes which bins that are just outside the track
dx (float) – Size of grid bins in x-direction
dy (float) – Size of grid bins in y-direction
std (float) – Standard deviation of the diffusion if it were Gaussian
alpha (float) – Diffusion constant. Should be 0.5 if Gaussian diffusion.
- Returns:
diffused_grid – For each bin in the grid, the diffusion of that bin
- Return type:
np.ndarray, shape (n_bins_x * n_bins_y, n_bins_x * n_bins_y)