Diffusion_MLE module
Created on Sun Feb 23 08:54:52 2020
@author: jbeckwith
- class Diffusion_MLE.D_MLE
Bases:
object- DSigma_MLE(coordinates, dT, R=0.16666666666666666, n_d=1, maxiter=100000, maxfun=100000, min_points=10)
Compute diffusion coefficient estimate, and estimate of the dynamic localisation error, using the MLE approach.
- Parameters:
coordinates (np.ndarray) – coordinates over time.
dT (float) – Time step.
R (float) – Motion blur coefficient.
n_d (int) – number of dimensions. If above 1, coordinates second dimension should be same shape as this number
maxiter (int) – maximum number of optimisation iterations to make
maxfun (int) – maximum number of function evaluations to make
min_points (int) – minimum number of points for a diffusion estimate. Default is 10.
- Returns:
D (float) – estimate of D value.
sigma (float) – estimate of dynamic localisation std.
- DSigma_MLE_BootStrap(coordinates, dT, R=0.16666666666666666, n_d=1, maxiter=100000, maxfun=100000, n_samples=1000, min_points=10)
Compute diffusion coefficient error estimate, and estimate of the error on the dynamic localisation error, using bootstrapping.
- Parameters:
coordinates (np.ndarray) – coordinates over time.
dT (float) – Time step.
R (float) – Motion blur coefficient.
n_d (int) – number of dimensions. If above 1, coordinates second dimension should be same shape as this number
maxiter (int) – maximum number of optimisation iterations to make
maxfun (int) – maximum number of function evaluations to make
n_samples (int) – number of boostrapped samples. default 1000.
min_points (int) – minimum number of points for a diffusion estimate. Default is 10.
- Returns:
D_err (float) – estimate of D value error
sigma_err (float) – estimate of dynamic localisation std error
- static likelihood_subfunction(d_xx, D, sig2, dT, R, n_d=1)
Compute log-likelihood for trajectories of particle tracking.
- Parameters:
d_xx (numpy.ndarray) – Square distance of the difference of trajectory. Second axis should be n_d
D (float) – Diffusion coefficient.
sig2 (float) – Variance.
dT (float) – Time step.
R (float) – Motion blur coefficient.
n_d (int) – number of dimensions. If above 1, d_xx second dimension should be same shape as this number
- Returns:
L (float) – Likelihood value.