Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Locates particles in video frames, links them into trajectories, and computes MSD for diffusion analysis using trackpy.
82% 91%+9 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 18 of 22 without it.
In a video dataset containing single particles alongside non-spherical particle aggregates and optical artifacts, which feature column returned by trackpy.locate measures non-circularity and can be thresholded to drop elongated aggregates?
Identifies ecc as the property column to filter out non-circular shapes.
3 of 3 safety checks passed
trackpy is a Python library for single-particle tracking (SPT) in video microscopy. It implements the Crocker-Grier algorithm to locate bright spots in each frame with subpixel precision, then links those positions across frames into continuous trajectories. From trajectories, trackpy computes mean squared displacement (MSD), diffusion coefficients, and motion classifications (confined, normal, directed). It handles 2D fluorescence videos, 3D confocal z-stacks, and large image sequences via memory-efficient streaming through the pims image reader library.
TrackMate (Fiji/ImageJ plugin) instead when you need a graphical interface, manual curation of tracks, or integration with biological object segmenters (Cellpose, StarDist).napari with napari-trackpy instead when you want interactive visualization and manual editing of trajectories alongside image data.trackpy, pims, pandas, numpy, matplotlib, scipyinvert=True for dark spots on bright background)pims handles most microscopy formats; for ND2 or CZI files install pims-nd2 or aicsimageiopip install trackpy pims pandas numpy matplotlib scipy
# For reading multi-channel or proprietary formats:
pip install pims[bioformats] # Bioformats via JPype
pip install aicsimageio # ND2, CZI, LIF via AICSImageIO
import trackpy as tp
import pims
# Load a TIF image stack (T frames × Y × X)
frames = pims.open("particles.tif") # shape: (T, Y, X)
# Locate particles in all frames
Next to this one in the catalogue, plus more from the same author.