Skip to main content

obsarray: Measurement uncertainty handling in Python

Tests codecov Documentation Status PyPI

obsarray is an extension to xarray for defining, storing and interfacing with uncertainty information using standardised metadata. It is particularly designed to work well with netCDF files and for the Earth Observation community.

Upcoming change: obsarray currently follows v0.1 of the UNC specification for uncertainty metadata. A future release will default to draft v0.2, which is proposed for inclusion in the CF conventions and is not backwards compatible with v0.1. See what this means for you.

obsarray is part of the CoMet Toolkit (community metrology toolkit), and can combined with the punpy (propagating uncertainties in python) module for very simple propagation of defined data uncertainties through arbitrary python functions.

Installation

obsarray is installable via pip:

pip install obsarray

Documentation

For more information visit our documentation.

Development

Clone the repository and install it in editable mode with the development extras:

pip install -e ".[dev]"   # Development tools (ruff, mypy, pytest, …)
pip install -e ".[docs]"  # Documentation build (sphinx, …)

Install the pre-commit hooks after cloning:

pre-commit install

When you commit, ruff will lint and format your code and mypy will type-check it. If it makes corrections the commit will be aborted so you can review the changes — just commit again once you are happy.

Run the test suite with:

pytest

Releasing

The package version is derived from git tags by setuptools_scm, so there is no version number to edit in the source. To release, tag main and push the tag:

git tag v<X.Y.Z>
git push origin v<X.Y.Z>

This triggers the publish.yml GitHub Actions workflow, which runs the tests, builds the sdist and wheel, and publishes them to PyPI via trusted publishing. The workflow can also be run manually from the GitHub Actions UI (type publish in the confirmation input).

Compatibility

obsarray requires Python 3.11 or later and is tested on Python 3.11, 3.12, and 3.13.

License

obsarray is free software licensed under the GNU Lesser General Public License (v3).

Acknowledgements

obsarray has been developed by the CoMet Toolkit Team.

The development has been funded by:

  • The UK's Department for Business, Energy and Industrial Strategy's (BEIS) National Measurement System (NMS) programme
  • The IDEAS-QA4EO project funded by the European Space Agency.

Project status

obsarray is under active development. It is beta software.

Metadata

Release files for obsarray 1.1

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

Source distribution (sdist)

Source distribution for obsarray 1.1
File Size Uploaded Provenance Actions
obsarray-1.1.tar.gz 526.7 kB With provenance Details for obsarray-1.1.tar.gz

Built distribution (wheel)

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

Total release size: 573.7 kB

Release files / obsarray-1.1.tar.gz

Download URL obsarray-1.1.tar.gz
Size 526.7 kB
Tags Source
SHA-256 checksum
How to use checksums
34761ef7bf3a77c5fb50fed555952e5b56414f37edf4f9d5aec841faa5ebafa7
BLAKE2b-256 checksum
How to use checksums
fccee3ee08a07d77de75e0a792014f26a70363c734dd6e00cb6525c76f3812c8
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 Oct 27, 2026.

Transparency log

Release files / obsarray-1.1-py3-none-any.whl

Download URL obsarray-1.1-py3-none-any.whl
Size 47.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1870f4892aa005ad6c0d140de34f7e30741d8dcd98462f1e66c2fe562a6694c4
BLAKE2b-256 checksum
How to use checksums
f9e50060a828c5783ab92776368624c515dd5c68e49972b61e94b65e47a45f2c
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 Oct 27, 2026.

Transparency log

Security for obsarray 1.1

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 obsarray-1.1.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 Oct 27, 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.

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