Skip to main content

Python helper library for the TSRT14 Sensor Fusion Course at LiU

Project description

sensorfusion-tools

Signal-systems utilities for estimation, modeling, and plotting.

Versioning

This library uses calendar-style semantic versions: YYYY.FEATURE.BUGFIX.

  • YYYY: release year (for long-term timeline tracking)
  • FEATURE: increments for new functionality
  • BUGFIX: increments for patches and fixes

Framework And Tooling

  • Language: Python 3.14+
  • Build backend: uv_build
  • Package/dependency workflow: uv
  • Numerical stack: numpy, scipy
  • Plotting: matplotlib

Testing Framework

  • Test runner: pytest
  • Property-based testing: hypothesis
  • Coverage: pytest-cov (configured for src/sftools)

Run tests:

uv run pytest

Run only sftools tests:

uv run pytest tests/sftools

Code Quality

  • Linting: ruff

Run lint:

uv run ruff check .

CI (GitLab)

The pipeline is defined in .gitlab-ci.yml and includes:

  • quality stage: ruff lint checks
  • test stage: pytest with JUnit artifact output

CI uses python:3.14-slim and installs dependencies with:

uv sync --group dev

License

Distributed under the MIT License. See LICENSE for details.

Project Structure

src/
	sftools/        # Main signal-system models, estimators, helpers, plotting, shared types

tests/
	sftools/          # Pytest suite for src/sftools (one test file per source file)
	fixtures/         # Regression test input/output fixtures

For sftools, tests mirror the source layout:

  • src/sftools/model_obs.py -> tests/sftools/test_model.py
  • src/sftools/estimator.py -> tests/sftools/test_estimator.py
  • src/sftools/helper.py -> tests/sftools/test_helper.py
  • src/sftools/plot.py -> tests/sftools/test_plot.py

Shared state/trajectory datatypes are defined in src/sftools/types.py:

  • GaussianState
  • ParticleState
  • StateTrajectory (supports probabilistic trajectories via write_state and deterministic trajectories via write_mean)

Useful StateTrajectory iteration helpers:

  • for y in traj yields state columns with shape (n, 1)
  • traj.iter_samples(include_cov=True, include_time=True) yields (y, cov, t) tuples when available

Plotting helpers in src/sftools/plot.py use StateTrajectory inputs.

Particle filter helper:

  • ParticleFilter.init_state_gaussian(mean, cov, n_particles) initializes a ParticleState from a Gaussian prior using the filter RNG.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sensorfusion_tools-2026.0.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sensorfusion_tools-2026.0.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file sensorfusion_tools-2026.0.0.tar.gz.

File metadata

  • Download URL: sensorfusion_tools-2026.0.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sensorfusion_tools-2026.0.0.tar.gz
Algorithm Hash digest
SHA256 851388c73777014ae1c36fc463cfdc7f05ae21c7b3ab4137ea14dbf9616962e9
MD5 9434a36de3408defc45794f807502f84
BLAKE2b-256 b3f63ba68feb5e20a7e17ab5423f0c660e304eaefc92dcd461790e252cbd50c9

See more details on using hashes here.

File details

Details for the file sensorfusion_tools-2026.0.0-py3-none-any.whl.

File metadata

  • Download URL: sensorfusion_tools-2026.0.0-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sensorfusion_tools-2026.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d23a99fbbf4c9734019b1b3187149748c108a11342ff18577bb17daff9f7d4d
MD5 288ba98562cd9cf8820f4fb07b67b428
BLAKE2b-256 e0097afb68f29111804e4a9262e7c84f85380df54fb1d6b960eac750d289b75c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page