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.1.0.tar.gz (1.8 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.1.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for combination_code-1.1.0.tar.gz
Algorithm Hash digest
SHA256 bbe09e045a0a827d33bdd398611373837e578b7a0c3d49203a829c22aa28b321
MD5 7cb9d75347442fc088a90a4533c462e6
BLAKE2b-256 d390057a8255be65ef1a1a7ad157d025cf0c116e8bb9fc41fbf846e39fc84186

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for combination_code-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5f880da3ddc58b44e17d8f290ec41234d1785daa7d8acb071bbc14bd5f1226f
MD5 381465b983cb65bfc921a647c579700b
BLAKE2b-256 86ca134cb671220a57a2ab55581c391d645a41f46b80f64c8a35d10f542f60d9

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