replay_trajectory_classification.environments.run_diffusion#
- run_diffusion(position_grid: np.ndarray, is_track_interior: np.ndarray, is_track_boundary: np.ndarray, dx: float, dy: float, std: float = 6.0, alpha: float = 0.5, dt: float = 0.25) np.ndarray[source]#
Calculates diffusion of a single point over time up until it matches a Gaussian with standard deviation std.
- Parameters:
position_grid (np.ndarray, shape (n_bins_x, n_bins_y)) – Function to diffusion
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.
dt (float) – Time step size
- Returns:
diffused_grid
- Return type:
np.ndarray, shape (n_bins_x, n_bins_y)