LangevinFunctions module
Created on Mon Sep 4 10:00:36 2023
@author: jbeckwith
- class LangevinFunctions.LF
Bases:
object- BrownianRot(DR, TStep, NSteps)
- BrownianRot function
generates random rotational motion using DR and TStep
- Parameters:
DR (float) – rotational diffusion coefficient
TStep (float) – time step relative to DT
NSteps (int) – number of steps to simulate
- Returns:
sph_coords (np.3Darray) – are theta, phi over time
- BrownianTrans_Ideal(DT, n_d, deltaT, N)
- BrownianTrans_Ideal function
generates random translational motion of N coordinates using DT and TStep assumes no localisation error, or effects from imaging
- Parameters:
DT (float) – translational diffusion coefficient
NAxes (int) – mumber of dimensions of diffusion
TStep (float) – time step relative to DT
NSteps (int) – number of steps to simulate
- Returns:
coordinates (np.ndarray) – coordinates over time
- BrownianTrans_Realistic(DT, N, n_d, deltaT, tE, sigma0, s0, R=0.16666666666666666)
BrownianTrans_Realistic function Generates displacements Delta from equations 2–5 of Michalet, X.; Berglund, A. J. Phys. Rev. E 2012, 85 (6), 061916. https://doi.org/10.1103/PhysRevE.85.061916. More realistic Brownian motion assuming tracked with a camera
- Parameters:
DT (float) – translational diffusion coefficient
N (int) – number of steps to simulate
n_d (int) – mumber of dimensions of diffusion
deltaT (flaot) – time step between data points
tE (float) – camera exposure duration (can be same as deltaT)
sigma0 (float) – static localisation error
s0 (float) – standard deviation of the PSF
R (float) – motion blur coefficient (see Equation 5 of paper)
- Returns:
coordinates (np.ndarray) – coordinates over time
- MultiBrownianTrans_Par(DT, N, n_d, deltaT, tE, sigma0, s0, n_molecules=10, volume=array([8, 8, 8]), R=0.16666666666666666, min_track_length=3)
MultiBrownianTrans_Volume function Generates displacements Delta from equations 2–5 of Michalet, X.; Berglund, A. J. Phys. Rev. E 2012, 85 (6), 061916. https://doi.org/10.1103/PhysRevE.85.061916. More realistic Brownian motion assuming tracked with a camera Simulates a specific volume Will split tracks that reach sigma0 from each other
- Parameters:
DT (float) – translational diffusion coefficient
N (int) – number of steps to simulate
n_d (int) – mumber of dimensions of diffusion
deltaT (flaot) – time step between data points
tE (float) – camera exposure duration (can be same as deltaT)
sigma0 (float) – static localisation error
s0 (float) – standard deviation of the PSF
n_molecules (int) – number of molecules simualted in the volume
volume (np.1darray) – dimensions of volume simulated, in same units as DT (same number of dimensions as n_d)
R (float) – motion blur coefficient (see Equation 5 of paper)
- Returns:
coordinates (dict) – coordinates of n_molecules over time
- MultiBrownianTrans_Volume(DT, N, n_d, deltaT, tE, sigma0, s0, n_molecules=10, volume=array([8, 8, 8]), bleach_probability=0.0, R=0.16666666666666666, min_track_length=10)
MultiBrownianTrans_Volume function Generates displacements Delta from equations 2–5 of Michalet, X.; Berglund, A. J. Phys. Rev. E 2012, 85 (6), 061916. https://doi.org/10.1103/PhysRevE.85.061916. More realistic Brownian motion assuming tracked with a camera Simulates a specific volume Will split tracks that reach sigma0 from each other
- Parameters:
DT (float) – translational diffusion coefficient
N (int) – number of steps to simulate
n_d (int) – mumber of dimensions of diffusion
deltaT (flaot) – time step between data points
tE (float) – camera exposure duration (can be same as deltaT)
sigma0 (float) – static localisation error
s0 (float) – standard deviation of the PSF
n_molecules (int) – number of molecules simualted in the volume
volume (np.1darray) – dimensions of volume simulated, in same units as DT (same number of dimensions as n_d)
bleach_probability (float) – if above 0, assigns a random proportion of frames to “off” and replaces them with interpolation.
R (float) – motion blur coefficient (see Equation 5 of paper)
- Returns:
coordinates (dict) – coordinates of n_molecules over time