ddm.simulation.generate_tracks#
- ddm.simulation.generate_tracks(n_particles: int = 100, steps: int = 1000, tau: float = 0.01, drift: Tuple[float, float] = (0.1, 0.1), window: Tuple[int, int] = (512, 512), pixel_size: float = 1e-07, D: float | None = None) ndarray [source]#
Generate tracks of particles undergoing 2D Brownian motion
- Parameters:
n_particles (
int
, optional) – number of particles, by default 100steps (
int
, optional) – number of time points to be simulated, by default 1000tau (
float
, optional) – time between steps in seconds, by default 0.01drift (
Tuple[float
,float]
, optional) – drift in x and y direction in fraction of step size, by default (-0.1, -0.1)window (
Tuple[int
,int]
, optional) – size of the simulated image in pixels, by default (512, 512)pixel_size (
float
, optional) – size of the pixel in meters, by default 1e-7D (
float
) – diffusion coefficient
- Returns:
3D array with particle tracks with shape (n_particles, dimensions, time points)
- Return type:
np.array