trackpy 0.3.0
  • Tutorial
  • Site
    • Introduction to Trackpy
    • Installing Trackpy
    • Updating Your Installation
    • API reference
    • What’s new in the package
    • Walkthrough
    • Prediction: Beyond Simple Random Walks
    • Feature finding in 3D confocal images
    • Subpixel Accuracy and Uncertainty Estimation
    • Advanced Linking: Subnetworks and search_range
    • Adaptive Search: Changing search_range on the Fly
    • Streaming: Processing Unlimited Frames On-Disk
    • Making trackpy fast(er)
    • Obtaining Diagnostic Information from Linking
    • Parallelized Feature Location using IPython Parallel
    • Custom Feature Detection: Bubble tracking in 2D foams
  • Page
    • trackpy.link_iter

trackpy.link_iter¶

trackpy.link_iter(levels, search_range, memory=0, neighbor_strategy='KDTree', link_strategy='auto', hash_size=None, box_size=None, predictor=None, adaptive_stop=None, adaptive_step=0.95, track_cls=None, hash_generator=None)¶

Link features into trajectories, assigning a label to each trajectory.

This function is a generator which yields at each step the Point objects for the current level. These objects know what trajectory they are in.

Parameters:

levels : iterable of iterables containing Points objects

e.g., a list containing lists with the Points in each frame

search_range : float

the maximum distance features can move between frames

memory : integer

the maximum number of frames during which a feature can vanish, then reppear nearby, and be considered the same particle. 0 by default.

neighbor_strategy : {‘KDTree’, ‘BTree’}

algorithm used to identify nearby features

link_strategy : {‘recursive’, ‘nonrecursive’, ‘numba’, ‘drop’, ‘auto’}

algorithm used to resolve subnetworks of nearby particles ‘auto’ uses numba if available ‘drop’ causes particles in subnetworks to go unlinked

hash_size : sequence

For ‘BTree’ mode only. Define the shape of the search region. (Higher-level wrappers of link infer this from the data.)

box_size : sequence

For ‘BTree’ mode only. Define the parition size to optimize performance. If None (default), the search_range is used, which is a reasonable guess for best performance.

predictor : function, optional

Improve performance by guessing where a particle will be in the next frame. For examples of how this works, see the “predict” module.

adaptive_stop : float, optional

If not None, when encountering an oversize subnet, retry by progressively reducing search_range until the subnet is solvable. If search_range becomes <= adaptive_stop, give up and raise a SubnetOversizeException.

adaptive_step : float, optional

Reduce search_range by multiplying it by this factor.

track_cls : class, optional

for special uses, you can specify a custom class that holds each Track

hash_generator : function, optional

a function that returns a HashTable, included for legacy support. Specifying hash_size and box_size (above) fully defined a HashTable.

Returns:

cur_level : iterable of Point objects

The labeled points at each level.

Back to top

Source

© Copyright 2010-2014, Trackpy Contributors.
Created using Sphinx 1.2.3.