EnsembleMSD¶
lumicks.pylake.kymotracker.detail.msd_estimation.EnsembleMSD
- class EnsembleMSD(lags: ndarray, msd: ndarray, sem: ndarray, variance: ndarray, counts: ndarray, effective_sample_size: ndarray, unit: str, _time_step: float, _unit_label: str)¶
Ensemble MSD result
Note that these values are obtained by using a weighted average of per-track MSDs. The weighting factor is determined by the number of points that went into the individual estimates. The standard error of the mean is computed using a weighted variance and the effective sample size determined for this procedure:
\[SEM_{i} = \frac{\sigma_{i}}{\sqrt{N_{i, effective}}}\]with \(i\) the lag index and \(N_{i, effective}\) given by:
\[N_{i, effective} = \frac{\left(\sum_{j}N_j\right)^2}{\sum_{j}N_{j}^2}\]with \(j\) the track index. If all tracks are of equal size, the weighting will have no effect.
- lags¶
Lags at which the MSD was computed.
- Type:
np.ndarray
- msd¶
Mean MSD for each lag.
- Type:
np.ndarray
- sem¶
Standard error of the mean corresponding to each MSD.
- Type:
np.ndarray
- variance¶
Variance of each MSD average.
- Type:
np.ndarray
- counts¶
Number of elements that contributed to the estimate corresponding to each lag.
- Type:
np.ndarray
- effective_sample_size¶
Effective sample size.
Since the estimate is based on weighted data, each observation does not contribute equally to the data. The effective sample size indicates the number of observations from an equally weighted sample that would yield the same level of precision. If all tracks have equal length and no missing data points, the effective sample size will simply equal the number of tracks.
- Type:
np.ndarray
- plot(**kwargs)¶
Plot Ensemble MSDs
- Parameters:
**kwargs – Forwarded to
matplotlib.pyplot.errorbar()
.