Skip to content

clockj/OpenLPT

Repository files navigation

OpenLPT 2.0

OpenLPT 2.0 is a new version of particle tracking code. It can be used for tracking dense tracers, polydisperse bubbles and many other objects.

Look how easy it is to use:

# Use in command line
${code_path}/bin/OpenLPT.exe config.txt
# Use in python
import pyOpenLPT as lpt

# redirect std::cout to python 
redirector = lpt.PythonStreamRedirector() 

config_file = '${path_to_config_file}'
lpt.run(config_file)

Features

  • User-friendly interface in python
  • Lagrangian particle tracking for multiple objects (point-like particles, spherical particles, etc.)
  • Support stereomatching with multiple cameras (at least 2)
  • Include multiple test cases for users to test and understand the code
  • Better structure for adding new functions

Installation - Python Version

Pre-request

  1. CMake
  2. Anaconda or Miniconda
  3. (Windows users) Visual Studio. Note: install the c++ development tools
  4. (Linux users) gcc.

Install OpenLPT

Create a python environment and install dependencies (for Windows users, it is suggested to use Anaconda Prompt finish the following steps).

# use conda
conda create -n OpenLPT python=3.9
conda activate OpenLPT
pip install -r requirements.txt
conda deactivate

Download the source code from github and install it

git clone https://github.com/clockj/OpenLPT.git
cd OpenLPT
conda activate OpenLPT
pip install .
conda deactivate

Use the package

# conda activate OpenLPT (run in the bash)
import pyOpenLPT as lpt 
redirector = lpt.PythonStreamRedirector() 

config_file = '${path_to_config_file}'
lpt.run(config_file)

Installation - CPP Version

Users who want to install the pure cpp version can refer to the file README_CPP.md

Contribute

Support

If you are having issues, please let me know. I have a mailing list located at: [email protected]

License

The project is licensed under the MIT license.