This guide covers the shortest path from installation to running a PyRecEst example.
PyRecEst supports Python 3.11 or newer and earlier than Python 3.15.
Install the default NumPy-backed package with:
python -m pip install pyrecestOptional extras install additional backend or domain-specific dependencies:
python -m pip install "pyrecest[pytorch_support]"
python -m pip install "pyrecest[jax_support]"
python -m pip install "pyrecest[healpy_support]"From a source checkout, install all optional dependencies with Poetry:
poetry install --with dev --all-extrasThe repository also provides a conda environment:
conda env create -f environment.ymlRun the test suite from the repository root:
python -m pytestBuild the documentation site, including generated API reference pages, with:
poetry install --with docs --without dev
poetry run mkdocs build --strictThe Kalman filter example is the smallest end-to-end filter workflow:
python examples/basic/kalman_filter.pyIt creates a one-dimensional constant-velocity model, predicts with a linear system matrix, updates with scalar position measurements, and prints the current position and velocity estimate after each measurement.
PyRecEst imports pyrecest.backend dynamically. The default backend is NumPy.
Set PYRECEST_BACKEND before Python imports pyrecest to use another backend.
On bash-compatible shells:
PYRECEST_BACKEND=pytorch python examples/basic/kalman_filter.py
PYRECEST_BACKEND=jax python examples/basic/kalman_filter.pyOn PowerShell:
$env:PYRECEST_BACKEND = "pytorch"
python examples/basic/kalman_filter.py
Remove-Item Env:PYRECEST_BACKENDInstall the matching optional extra before selecting a non-default backend.
Some examples and APIs are backend-specific. For example,
examples/basic/multi_target_tracking.py currently checks for the NumPy backend
at runtime. See backend compatibility for the
support model and known limitations.
- Work through the task tutorials for distribution, filtering, tracking, and evaluation workflows.
- Start with the examples guide for runnable scripts.
- Look at the API overview to find the package that owns a concept.
- Check backend compatibility before relying on a non-default backend for advanced APIs.
- Use the API reference for generated public package reference pages.
- Read Shapes and conventions before writing custom models or tracker measurement sets.
- Use
tests/as executable reference material for advanced APIs that do not have dedicated tutorials yet.