trackpy.motion.emsd

trackpy.motion.emsd(traj, mpp, fps, max_lagtime=100, detail=False, pos_columns=None)

Compute the ensemble mean squared displacements of many particles.

Parameters:
trajDataFrame of trajectories of multiple particles, including

columns particle, frame, x, and y

mppmicrons per pixel
fpsframes per second
max_lagtimeintervals of frames out to which MSD is computed

Default: 100

detailSet to True to include <x>, <y>, <x^2>, <y^2>. Returns

only <r^2> by default.

Returns:
Series[msd, index=t] or, if detail=True,
DataFrame([<x>, <y>, <x^2>, <y^2>, msd], index=t)

Notes

Input units are pixels and frames. Output units are microns and seconds.