trackpy.predict.ChannelPredict

class trackpy.predict.ChannelPredict(bin_size, flow_axis='x', minsamples=20, initial_profile_guess=None, span=1)

Predict a particle’s position based on its spanwise coordinate in a channel.

This operates by binning particles according to their spanwise coordinate and averaging velocity, to make an instantaneous velocity profile.

Parameters:

bin_size : Size of bins, in units of spanwise length, over which to average

streamwise velocity.

flow_axis : Name of coordinate along which particles are flowing (default “x”)

minsamples : Minimum number of particles in a bin for its average

velocity to be valid.

initial_profile_guess : Nx2 array (optional)

(spanwise coordinate, streamwise velocity) samples specifying initial velocity profile. Samples must be sufficiently dense to account for variation in the velocity profile. If omitted, initial velocities are assumed to be zero.

span : integer, default 1

Compute velocity field from the most recent span+1 frames.

Notes

  • This currently only works for 2D data.

  • Where there were not enough data to make an average velocity (N < minsamples),

    we borrow from the nearest valid bin.