link - Nearest neighbor linking¶
- gpu_tracking.link(to_link, search_range, memory)¶
Performs optimal (as opposed to greedy) nearest neighbor linking on the provided dataframe.
- Returns:
The input dataframe with an additional column “particle”, which denotes which particles are identical throughout frames.
- Return type:
pandas.DataFrame
- Parameters:
to_link – A pandas dataframe with atleast the columns “frame”, “y” and “x”.
search_range – The upper cutoff distance for nearest neighbor linking.
memory – The number of frames that a particle is allowed to disappear before reappearing, for the purposes of linking. memory = 5 means that a particle can be gone for 5 frames, reappearing in the 6th and still be linked to the track it had built previously. If it had reappeared in the 7th, it would instead have been considered a new particle. Defaults to 0, and has no effect if search_range is not set.