trackpy.predict.ChannelPredict

class trackpy.predict.ChannelPredict(bin_size, flow_axis='x', minsamples=20, initial_profile_guess=None, pos_columns=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_sizeSize of bins, in units of spanwise length, over which to average

streamwise velocity.

flow_axisName of coordinate along which particles are flowing (default “x”)
minsamplesMinimum number of particles in a bin for its average

velocity to be valid.

initial_profile_guessNx2 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.

pos_columnslist of d strings, optional

Names of coordinate columns. Required only if not using link_df or link_df_iter.

spaninteger, 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.