MyPTV

MyPTV: A Python Package for 3D Particle Tracking - Published in JOSS (2022)

https://github.com/ronshnapp/myptv

Science Score: 93.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 9 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

3d-ptv experiments fluid-mechanics measurements particle-tracking photogrammetry python turbulence

Scientific Fields

Sociology Social Sciences - 38% confidence
Last synced: 4 months ago · JSON representation

Repository

MyPTV is an open source library designed for 3D particle Tracking (3D-PTV) measurements

Basic Info
  • Host: GitHub
  • Owner: ronshnapp
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: master
  • Homepage:
  • Size: 81.9 MB
Statistics
  • Stars: 61
  • Watchers: 2
  • Forks: 20
  • Open Issues: 7
  • Releases: 3
Topics
3d-ptv experiments fluid-mechanics measurements particle-tracking photogrammetry python turbulence
Created almost 4 years ago · Last pushed 6 months ago
Metadata Files
Readme License

Readme.md

March 13, 2025

Version: 1.3.4

DOI DOI

About

MyPTV is an open source software designed for 3D particle Tracking Velocimetry (3D-PTV) measurements. In short, 3D-PTV is a method used to track the positions of particles in three dimensions, which is used extensively in fluid mechanics, biology and soft matter physics. The method relies on stereoscopic digital photography from calibrated cameras to infer particle's 3D positions and track their motion through time.

MyPTV makes 3D particle tracking accessible to a wide range of scientists in two ways. First, we use the Python programming language, which is open source and accessible to the scientific, non-professional computer programmers, community. We believe that this accessibility to the inner workings of the code is essential for 3D-PTV to go into the future. Second, we attempt to keep the dependencies as few as possible and write as much of the code ourselves; this will help in maintaining the project for many years to come as Python keeps evolving.

MyPTV builds heavily on the well-proven mathematical framework developed in the OpenPTV project (https://www.openptv.net/), and especially, the photogrammetry principles are the same [1]. The main difference is that the code is written in Python, thus making it accessible to a wider scientific community. Furthermore, MyPTV uses several new adaptations of the traditional algorithms that have been introduced in recent years, e.g. [2-6], and several novel algorithms that we are using were developed here.

Who is MyPTV for?

MyPTV is designed to be used by scientists and engineers who need to track the the three dimensional motion of objects in lab and field experiments. Applications range from fluid mechanics to biology, soft matter, or medicine.

What is MyPTV capable of?

1) Combining images of particles from several orientations to give their 3D position 2) Calibrating cameras based on given input imaeges 3) Locating and extracting the locations of particles in images 4) Stereo-matching of numerous particles from 2D images 5) Tracking particles in 3D 6) Tracking particles in 2D 7) Smoothing particle trajectories while calculating their velocities and accelerations 8) Re-connecting broken trajectories 9) Measuring the orientations of anisotropic particles in 3D (new from version 7.0.0 and on)

How to install?

Requirements:

MyPTV requires you have Python 3 installed with pip, along with the Python packages: numpy, scipy, scikit-image, pandas, matplotlib, itertools

Installation:
Using pip

1) Open your terminal and change directory to the path of the code:

cd path/to/myptv ​ 2) we use pip to install by using the following command:

pip install . or pip install -r .\requirements.txt

3) Optionally, parts of the code can be tested using pytest:

pytest ./tests/ -W ignore::RuntimeWarning

Using conda

1) Install Anaconda or Miniconda and from the command shell inside the directory where the package is downloaded:

conda env create -f environment.yml

2) Activate the environment:

conda activate myptv

3) Install MyPTV in the new environment:

pip install .

4) Optionally, parts of the code can be tested using pytest:

pytest ./tests/ -W ignore::RuntimeWarning

How to start?

To setup MyPTV on your local machine, either clone or download this repository and install MyPTV using the instructions above. Then, you can find detailed using instructions in the Manual (see /user_manual/user_manual.pdf).

After the installation is done, you can import MyPTV in your python code as usual. For example: import myptv.imaging_mod or
from myptv import imaging_mod

Community guidelines

MyPTV was founded in 2022 by Ron Shnapp. In its core, MyPTV is a scientific open source project and contributions are most welcome!

1) Facing difficulties using of installing MyPTV? Want to share your new exciting results? Try posting a question on MyPTV's Discussion forum - https://github.com/ronshnapp/MyPTV/discussions.

2) Do you wish to contribute to our effort by further developing of MyPTV? Would you like to help debugging and/or test the software? Please leave a post on our Discussion forum - https://github.com/ronshnapp/MyPTV/discussionscontact.

3) Did you spot a bug? Would like to raise an issue? Please open an issue in our Github repositories' issues section - https://github.com/ronshnapp/MyPTV/issues.

In any case, if you feel the need - please feel free to send Ron an email directly (ronshnapp@gmail.com)!

How to cite?

If you found MyPTV useful for your scientific work, you may cite us as:

Shnapp, R., (2022). MyPTV: A Python Package for 3D Particle Tracking. Journal of Open Source Software, 7(75), 4398, https://doi.org/10.21105/joss.04398

See our paper on JOSS: https://joss.theoj.org/papers/10.21105/joss.04398#

References

[1] Maas, H. G., Gruen, A., & Papantoniou, D. (1993). Particle tracking velocimetry in three-dimensional flows. Experiments in fluids, 15(2), 133-146.

[2] Mann, J., Ott, S., & Andersen, J. S. (1999). Experimental study of relative, turbulent diffusion. Risø National Laboratory.

[3] Ouellette, N. T., Xu, H., & Bodenschatz, E. (2006). A quantitative study of three-dimensional Lagrangian particle tracking algorithms. Experiments in Fluids, 40(2), 301-313.

[4] Schanz, D., Schröder, A., Gesemann, S., Michaelis, D., & Wieneke, B. (2013). Shake the box: a highly efficient and accurate tomographic particle tracking velocimetry (TOMO-PTV) method using prediction of particle positions.

[5] Shnapp, R., Shapira, E., Peri, D., Bohbot-Raviv, Y., Fattal, E., & Liberzon, A. (2019). Extended 3D-PTV for direct measurements of Lagrangian statistics of canopy turbulence in a wind tunnel. Scientific reports, 9(1), 1-13.

[6] Bourgoin, M., & Huisman, S. G. (2020). Using ray-traversal for 3D particle matching in the context of particle tracking velocimetry in fluid mechanics. Review of scientific instruments, 91(8), 085105.

Owner

  • Name: Ron Shnapp
  • Login: ronshnapp
  • Kind: user
  • Location: Tel Aviv, Israel

Postdoc focusing on experimental fluid mechanics

JOSS Publication

MyPTV: A Python Package for 3D Particle Tracking
Published
July 30, 2022
Volume 7, Issue 75, Page 4398
Authors
Ron Shnapp ORCID
Swiss Federal Institute for Forest, Snow and Landscape Research WSL, 8903 Birmensdorf, Switzerland
Editor
Jeff Gostick ORCID
Tags
3D particle tracking Fluid mechanics Turbulence Experimental methods

GitHub Events

Total
  • Issues event: 10
  • Watch event: 16
  • Issue comment event: 13
  • Push event: 42
  • Pull request event: 2
  • Fork event: 5
  • Create event: 2
Last Year
  • Issues event: 10
  • Watch event: 16
  • Issue comment event: 13
  • Push event: 42
  • Pull request event: 2
  • Fork event: 5
  • Create event: 2

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 315
  • Total Committers: 3
  • Avg Commits per committer: 105.0
  • Development Distribution Score (DDS): 0.083
Past Year
  • Commits: 80
  • Committers: 2
  • Avg Commits per committer: 40.0
  • Development Distribution Score (DDS): 0.025
Top Committers
Name Email Commits
Ron Shnapp r****p@g****m 289
Alex Liberzon a****b 24
Alessandro Gambino 1****o 2

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 35
  • Total pull requests: 6
  • Average time to close issues: 4 months
  • Average time to close pull requests: 29 days
  • Total issue authors: 10
  • Total pull request authors: 1
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 6
  • Pull requests: 0
  • Average time to close issues: 3 days
  • Average time to close pull requests: N/A
  • Issue authors: 3
  • Pull request authors: 0
  • Average comments per issue: 2.33
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • alexlib (14)
  • leahmendelson (9)
  • bennyV13 (4)
  • jgostick (2)
  • ManikandanRaghu05 (1)
  • voddan (1)
  • 9sven6 (1)
  • jennifer-yin (1)
  • yukeli1993 (1)
  • ErichZimmer (1)
Pull Request Authors
  • alexlib (6)
  • ronshnapp (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements.txt pypi
  • Pillow *
  • PyWavelets *
  • cycler *
  • fonttools *
  • imageio *
  • ipykernel *
  • kiwisolver *
  • matplotlib *
  • networkx *
  • numpy *
  • opencv-python *
  • packaging *
  • pandas *
  • pyparsing *
  • pytest *
  • python-dateutil *
  • pytz *
  • pyyaml *
  • scikit-image *
  • scipy *
  • six *
  • tifffile *
  • tk *
setup.py pypi
  • Pillow *
  • matplotlib *
  • numpy *
  • pandas *
  • pyyaml *
  • scikit-image *
  • scipy *
  • tk *
.github/workflows/main.yml actions
  • actions/checkout v2 composite
  • softprops/action-gh-release v1 composite
  • xu-cheng/latex-action v2 composite
environment.yml pypi