trackpy.motion.is_typical¶
- trackpy.motion.is_typical(msds, frame, lower=0.1, upper=0.9)¶
Identify which paritcles’ MSDs are in the central quantile.
- Parameters:
- msdsDataFrame
This should be organized like the output of imsd(). Columns correspond to particles, indexed by lagtime in frames.
- frameinteger
Compare MSDs at this lag interval.
- lowerfloat between 0 and 1, default 0.1
Probes with MSD up to this quantile are deemed outliers.
- upperfloat between 0 and 1, default 0.9
Probes with MSD above this quantile are deemed outliers.
- Returns:
- Series of boolean values, indexed by particle number
- True = typical particle, False = outlier particle
Examples
>>> m = tp.imsd(traj, MPP, FPS) >>> # Index by particle ID, slice using boolean output from is_typical(), and then >>> # restore the original index, frame number. >>> typical_traj = traj.set_index('particle').ix[is_typical(m)] .reset_index().set_index('frame', drop=False)