Skip to main content

Utilities to combine correlated physics measurement results

Project description

Combination Code

Pipeline Status Coverage

This is a generic averaging code to combine an arbitrary set of (experimental) results under consideration of the statistical errors and their correlations, and systematic errors and correlations, both between the parameters of one measurement and different measurements. The code documentation providing detailed instructions to the example code is available here.

A tutorial is available here

Installation

Install with `pip in a virtual environment

python3 -m venv coco-env
cd coco-env
source bin/activate
python -m pip install combination-code

Doucumentation and examples are available in share/combination-code

The Python package is exposed as:

from combination_code import ResultList, ResultSet, readResultListJSON

Development

Install the package in editable mode with development tooling:

python3 -m venv coco-env
cd coco-env
source bin/activate
git clone ssh://git@gitlab.cern.ch:7999/hflav/shared/combination-code.git
cd combination-code
pip install -e .[dev]

Run all tests (unit + system):

pytest

Test Suite

The repository includes two test layers:

  • Unit tests in tests/unit/ for core APIs in ResultSet, ResultList, and IntercorrelationMaps.
  • System tests in tests/system/ that execute tutorial examples from tutorial/Example1, tutorial/Example2, and tutorial/Example3 and validate expected output artifacts.

System tests force a non-interactive Matplotlib backend (Agg) so they run reliably in CI.

Continuous Integration

GitHub Actions workflow build.yml now:

  • Runs the test suite on Python 3.10 and 3.14.
  • Produces coverage output via pytest-cov.
  • Uploads coverage.xml as a CI artifact.

Build and release (PyPI)

This is done via Gitlab CI. Simply create a new release with the for vX.Y.Z format following semantic versioning.

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

combination_code-1.0.0.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

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

combination_code-1.0.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file combination_code-1.0.0.tar.gz.

File metadata

  • Download URL: combination_code-1.0.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for combination_code-1.0.0.tar.gz
Algorithm Hash digest
SHA256 983bb98fff576858fe50ebf084315b7ace41eb6dd952feee843cebef69aa08f9
MD5 4a0c79ce3e87293714d19a5a7fc85224
BLAKE2b-256 0a9e8656568ae318d771c39e1e5b9c7ddad5ef58962e2e847f4bcff1968f8193

See more details on using hashes here.

File details

Details for the file combination_code-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for combination_code-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0dd6c0dc3dc70278947eca98c5b23a66e1b51cd33e54444b0fa7d1f1cad16428
MD5 d169f0218458fc5d6b3b5a89194655ab
BLAKE2b-256 efd210656732d8e9eaa4d498bfcd62f64b637f9da3181e0a35e0c20cf48b2f87

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