trackpy.motion.subtract_drift

trackpy.motion.subtract_drift(traj, drift=None, inplace=False)

Return a copy of particle trajectories with the overall drift subtracted out.

Parameters:
trajDataFrame of trajectories, including columns x, y, frame,

and particle (if there is more than one particle).

driftoptional DataFrame([x, y], index=frame) like output of

compute_drift(). If no drift is passed, drift is computed from traj.

Returns:
traja copy, having modified columns x and y