Skip to main content

Basic tools and wrappers for enabling not-too-alien syntax when running columnar Collider HEP analysis.

Project description

logo

coffea - Columnar Object Framework For Effective Analysis

https://zenodo.org/badge/159673139.svg https://github.com/scikit-hep/coffea/actions/workflows/ci.yml/badge.svg https://codecov.io/gh/scikit-hep/coffea/branch/master/graph/badge.svg?event=schedule https://badge.fury.io/py/coffea.svg https://img.shields.io/pypi/dm/coffea.svg https://img.shields.io/conda/vn/conda-forge/coffea.svg https://badges.gitter.im/scikit-hep/coffea.svg https://mybinder.org/badge_logo.svg

Basic tools and wrappers for enabling not-too-alien syntax when running columnar Collider HEP analysis.

coffea is a prototype package for pulling together all the typical needs of a high-energy collider physics (HEP) experiment analysis using the scientific python ecosystem. It makes use of uproot and awkward-array to provide an array-based syntax for manipulating HEP event data in an efficient and numpythonic way. There are sub-packages that implement histogramming, plotting, and look-up table functionalities that are needed to convey scientific insight, apply transformations to data, and correct for discrepancies in Monte Carlo simulations compared to data.

coffea also supplies facilities for horizontally scaling an analysis in order to reduce time-to-insight in a way that is largely independent of the resource the analysis is being executed on. By making use of modern big-data technologies like parsl, Dask , and TaskVine, it is possible with coffea to scale a HEP analysis from a testing on a laptop to: a large multi-core server, computing clusters, and super-computers without the need to alter or otherwise adapt the analysis code itself.

coffea is a HEP community project collaborating with iris-hep and is currently a prototype. We welcome input to improve its quality as we progress towards a sensible refactorization into the scientific python ecosystem and a first release. Please feel free to contribute at our github repo!

Installation

Install coffea like any other Python package:

pip install coffea

or similar (use sudo, --user, virtualenv, or pip-in-conda if you wish). For more details, see the Installing coffea section of the documentation.

Strict dependencies

The following are installed automatically when you install coffea with pip:

  • numpy (1.22+);

  • uproot for interacting with ROOT files and handling their data transparently;

  • awkward-array to manipulate complex-structured columnar data, such as jagged arrays;

  • numba just-in-time compilation of python functions;

  • scipy for many statistical functions;

  • matplotlib as a plotting backend;

  • and other utility packages, as enumerated in pyproject.toml.

Documentation

All documentation is hosted at https://coffea-hep.readthedocs.io/

Citation

If you would like to cite this code in your work, you can use the zenodo DOI indicated in CITATION.cff, or the latest DOI. You may also cite the proceedings:

  • “N. Smith et al 2020 EPJ Web Conf. 245 06012”

  • “L. Gray et al 2023 J. Phys.: Conf. Ser. 2438 012033”

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

coffea-2026.5.0.tar.gz (27.6 MB view details)

Uploaded Source

Built Distribution

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

coffea-2026.5.0-py3-none-any.whl (309.2 kB view details)

Uploaded Python 3

File details

Details for the file coffea-2026.5.0.tar.gz.

File metadata

  • Download URL: coffea-2026.5.0.tar.gz
  • Upload date:
  • Size: 27.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for coffea-2026.5.0.tar.gz
Algorithm Hash digest
SHA256 1bcee0c4fefb05a1a7e1942dca71c14d2715fa2eaa558ab540d55f36d85545db
MD5 464a61ef5d27bd33198fc537ea6073df
BLAKE2b-256 cf99d42f57bf88cd7b03935aee949dda9c86550d8bcc88488e15804fe4efc422

See more details on using hashes here.

File details

Details for the file coffea-2026.5.0-py3-none-any.whl.

File metadata

  • Download URL: coffea-2026.5.0-py3-none-any.whl
  • Upload date:
  • Size: 309.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for coffea-2026.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 355d0b94bde3bf42f2439769d7447d1599f33eeb59d5f9e0d130224758a9d0d1
MD5 ee6f14b3f2ba02c86b97c711902eba65
BLAKE2b-256 9ce34c603b753613f9c1abde16de325d401093b33ae008d00f3c37ab636c6fc2

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