tobac.merge_split.build_distance_function#

tobac.merge_split.build_distance_function(min_h1, max_h1, min_h2, max_h2, PBC_flag, is_3D)#

Function to build a partial `calc_distance_coords_pbc` function suitable for use with trackpy

Parameters:
  • min_h1 (int) – Minimum point in hdim_1

  • max_h1 (int) – Maximum point in hdim_1

  • min_h2 (int) – Minimum point in hdim_2

  • max_h2 (int) – Maximum point in hdim_2

  • PBC_flag (str('none', 'hdim_1', 'hdim_2', 'both')) – Sets whether to use periodic boundaries, and if so in which directions. ‘none’ means that we do not have periodic boundaries ‘hdim_1’ means that we are periodic along hdim1 ‘hdim_2’ means that we are periodic along hdim2 ‘both’ means that we are periodic along both horizontal dimensions

  • is_3D (bool) – True if coordinates are to be provided in 3D, False if 2D

Returns:

A version of calc_distance_coords_pbc suitable to be called by just f(coords_1, coords_2)

Return type:

function object