Return the ensemble drift, x(t).
Parameters: | traj : DataFrame of trajectories, including columns x, y, frame, and particle smoothing : integer
|
---|---|
Returns: | drift : DataFrame([x, y], index=frame) |
Examples
>>> compute_drift(traj).plot() # Default smoothing usually smooths too much.
>>> compute_drift(traj, 0).plot() # not smoothed
>>> compute_drift(traj, 15).plot() # Try various smoothing values.
>>> drift = compute_drift(traj, 15) # Save good drift curves.
>>> corrected_traj = subtract_drift(traj, drift) # Apply them.