locan.data.tracking.track#

locan.data.tracking.track(locdata, search_range=40, memory=0, **kwargs)[source]#

Cluster (in time) localizations in LocData that are nearby in successive frames. Clustered localizations are identified by the trackpy linking method.

The new locdata object carries properties with the same name as the original locata. They are computed as sum for intensity, as the first value for frame, and as mean for all other properties.

Parameters:
  • locdata – Localization data on which to perform the manipulation.

  • search_range – The maximum distance features can move between frames, optionally per dimension

  • memory – The maximum number of frames during which a feature can vanish, then reappear nearby, and be considered the same particle.

  • kwargs – Other parameters passed to trackpy.link_df.

Returns:

A new LocData instance assembling all generated selections (i.e. localization cluster). A series named ‘Track’ referring to the track number.

Return type:

tuple[Locdata, pandas.Series[Any]]

Note

In order to switch off the printout from trackpy.link() and increase performance use trackpy.quiet() to silence the logging outputs.