Skip to main content

pymetrology

GUM-compliant metrological characterisation of low-cost data acquisition chains.

pymetrology turns raw readings from a sensor + microcontroller + ADC chain (Arduino, ESP32, Raspberry Pi Pico, ...) into the figures a measurement needs before it can be trusted: resolution, noise, effective number of bits, calibration, sampling adequacy, drift and a GUM uncertainty budget.

Status: alpha (v0.1). Only the adc module is available.

Installation

pip install pymetrology

From source:

git clone https://github.com/ThermalProjects/pymetrology
cd pymetrology
pip install -e ".[dev]"
pytest

Quick start

import numpy as np
from pymetrology import characterize_noise, enob_sine, lsb

codes = np.loadtxt("static_codes.csv", dtype=int)   # constant input
print(characterize_noise(codes, bits=12, vref=3.3).summary())

v = np.loadtxt("sine_codes.csv") * lsb(3.3, 12)       # near full-scale sine
print(enob_sine(v, fs=5000, bits=12, vref=3.3).summary())

Features (v0.1)

Function What it gives Reference
lsb, quantization_uncertainty LSB size; type B quantisation uncertainty (LSB/√12) GUM 4.3.7
characterize_noise RMS and peak-to-peak noise, effective and noise-free resolution, type A uncertainty of the mean corrected for autocorrelation GUM 4.2
code_histogram Code histogram and missing codes IEEE 1241
enob_sine Four-parameter sine fit, SINAD and ENOB IEEE 1057, IEEE 1241

Roadmap

  • calibration: calibration against a certified reference, with uncertainty in both axes
  • sampling: minimum sampling rate and anti-aliasing filter from the system dynamics
  • drift: long-term drift and Allan deviation
  • uncertainty: full GUM uncertainty budget per measurand
  • report: Markdown/HTML report for supplementary material

Citation

If you use pymetrology in your research, please cite it using the metadata in CITATION.cff.

Acknowledgements

Developed at SIANI, Universidad de Las Palmas de Gran Canaria.

License

MIT

Metadata

Release files for pymetrology 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymetrology 0.1.0
File Size Uploaded Provenance Actions
pymetrology-0.1.0.tar.gz 8.8 kB With provenance Details for pymetrology-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pymetrology 0.1.0
File Interpreter ABI Platform Actions
pymetrology-0.1.0-py3-none-any.whl Python 3 none any Details for pymetrology-0.1.0-py3-none-any.whl

Total release size: 16.8 kB

Release files / pymetrology-0.1.0.tar.gz

Download URL pymetrology-0.1.0.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
513e9152ea7770890fd540cf36abca8ffaae361bb39631bf7d531271d7a9e175
BLAKE2b-256 checksum
How to use checksums
41ff6f6878976f44e7c1a8d87135a783af2c27747115ae2c3fce0c344a0c8503
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Release files / pymetrology-0.1.0-py3-none-any.whl

Download URL pymetrology-0.1.0-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5563c575187d91b03a1d884830c9690592b192416de7121560c7be75c445680e
BLAKE2b-256 checksum
How to use checksums
608d2491f6265140e2439b18723858eae2af08be759d7f8fe4a2c5b59ce88435
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Security for pymetrology 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pymetrology-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page