multi_locus_analysis.stats

Statistical methods for trajectory analysis.

Moment-based calculations can found in the multi_locus_analysis.stats.moments submodule, and helper functions for dealing with distributional data can be found in multi_locus_analysis.stats.distributions.

multi_locus_analysis.stats.convex_hull(df, xcol='x', ycol='y', zcol=None, tcol='t', allowed_t=None, max_t=None, volume=False, area=False)[source]

Compute the convex hull of a trajectory.

For a DataFrame containing a trajectory with (X,[Y,[Z]]) values in xcol, ycol, and zcol (respectively), use scipy.spatial.ConvexHull (uses “QHull” under the hood) to calculate the convex hull (including area/volume), optionally only looking at certain times along the trajectory.

2D by default (xcol=’x’, ycol=’y’).