Welcome to Flowtracks¶
Flowtracks is a Python package for post-processing 3D Particle Tracking Velocimetry (3D-PTV) trajectory databases. It reads trajectory data in the formats the 3D-PTV community produces, turns it into Eulerian velocity fields, performs phase and ensemble averaging for periodic flows, and exports results as Zarr and ParaView (VTK) files.
- Getting Started
- Importing OpenPTV data
- From file to picture
- Importing MyPTV data
- From file to picture
- Importing proPTV data
- Importing OpenLPT / pyOpenLPT data
- Modules Containing Flowtracks Basic Data Structures
- Particle class reference
- Input and Output Routines
FramesIteratorSingleFileIteratortrajectories_mat()trajectories_acc()iter_trajectories_ptvis()trajectories_ptvis()trajectories()infer_format()read_frame_data()save_trajectories()save_particles_table()save_frames_hdf()trajectories_table()load_trajectories()read_zarr_arrays()read_zarr_trajectories()save_zarr_trajectories()
- Scene and Dual Scene Manipulation
- ZarrScene
- Pipeline
- Writers (ParaView export)
- The Basic Analysis Machinery
- Cleaning chain
- Trajectory repair
- Merging two camera systems
- Stitching
- From file to picture
- Reference for the smoothing module
- From file to picture
- Interpolation module reference
- Reference for flowtracks.graphics
- Reference for flowtracks.pairs
- Sequence Processing of non-HDF Formatted Particle Databases
- Lyapunov exponents:
flowtracks.lyapunov - Vortex, Wall Shear & Flux
- Multi-run combination
- Provenance
Getting Started¶
Install the latest release from PyPI:
pip install flowtracks
Optional extras:
pip install "flowtracks[vtk]" # ParaView export (pyvista/vtk)
pip install "flowtracks[legacy-io]" # legacy PyTables HDF5 reader
pip install "flowtracks[flux]" # centerline flux (scikit-image)
Requires Python ≥ 3.11. For development, clone the repository and run
uv sync --group dev (or pip install -e ".[vtk]").
from flowtracks.io import trajectories
from flowtracks.eulerian import eulerian_grid
# Read trajectory data (format inferred from the file name)
trajs = trajectories("data/my_run.zarr")
# Bin a run to an Eulerian grid
ds = eulerian_grid("data/my_run.zarr", grid_params, 0, 1)
The Pipeline page describes the full xarray-based pipeline; the Writers (ParaView export) page covers export to ParaView.
Two backend families¶
Flowtracks ships two duck-typed trajectory readers:
HDF5 / PyTables —
SceneandDualScene(optionallegacy-ioextra).Zarr —
ZarrScene, the recommended backend. It reads thetrajectories/group written byopenptv2’s RunStore directly, with no conversion step.
Both expose the same public methods, so callers (and the xarray modules) work against either.
Where the docs live¶
This page is the top-level index. The more narrative material — recipes and
math notes for Eulerian statistics, plus a static “story” produced with
marimo — is in the repository’s docs/ directory, not here:
docs/eulerian_statistics.md— per-run vs pooled statistics, the math, and usage recipes (requires a YAML recipe in the repo).docs/story/— a marimo-studio HTML story of the pipeline.
Source code lives in flowtracks/ and examples in examples/.