Giter Club home page Giter Club logo

uproot4's Introduction

PyPI version Conda-Forge Python 2.7,3.5β€’3.9 BSD-3 Clause License Continuous integration tests

Scikit-HEP NSF-1836650 DOI 10.5281/zenodo.4340632 Documentation Gitter

Uproot is a reader and a writer of the ROOT file format using only Python and Numpy. Unlike the standard C++ ROOT implementation, Uproot is only an I/O library, primarily intended to stream data into machine learning libraries in Python. Unlike PyROOT and root_numpy, Uproot does not depend on C++ ROOT. Instead, it uses Numpy to cast blocks of data from the ROOT file as Numpy arrays.

Installation

Uproot can be installed from PyPI using pip (Awkward Array is optional but highly recommended):

pip install uproot awkward

Uproot is also available using conda (so is Awkward Array, which conda installs automatically):

conda install -c conda-forge uproot

If you have already added conda-forge as a channel, the -c conda-forge is unnecessary. Adding the channel is recommended because it ensures that all of your packages use compatible versions:

conda config --add channels conda-forge
conda update --all

Note: if you need to write ROOT files, you'll need to use the deprecated uproot3 for now. This feature is coming to the new version soon.

Getting help

Start with the tutorials and reference documentation.

Installation for developers

Uproot is an ordinary Python library; you can get a copy of the code with

git clone https://github.com/scikit-hep/uproot4.git

and install it locally by calling pip install . in the repository directory.

If you need to develop Awkward Array as well, see its installation for developers.

Dependencies

Uproot's only strict dependency is NumPy. This is the only dependency that pip will automatically install.

Awkward Array is highly recommended. It is not a strict dependency to allow Uproot to be used in restrictive environments. If you're using Uproot without Awkward Array, you'll have to use the library="np" option or globally set uproot.default_library to return arrays as NumPy arrays (see documentation).

  • awkward: be sure to use Awkward Array 1.x.

The following libraries are also useful in conjunction with Uproot, but are not necessary. If you call a function that needs one, you'll be prompted to install it. (Conda installs most of these automatically.)

For ROOT files, compressed different ways:

  • lz4 and xxhash: only if reading ROOT files that have been LZ4-compressed.
  • zstandard: only if reading ROOT files that have been ZSTD-compressed.
  • backports.lzma: only if reading ROOT files that have been LZMA-compressed (in Python 2).

For remote data:

  • xrootd: only if reading files with root:// URLs.

For exporting data to other libraries:

  • pandas: only if library="pd".
  • cupy: only if library="cp" (reads arrays onto GPUs).
  • boost-histogram: only if converting histograms to boost-histogram with histogram.to_boost().
  • hist: only if converting histograms to hist with histogram.to_hist().

Acknowledgements

Support for this work was provided by NSF cooperative agreement OAC-1836650 (IRIS-HEP), grant OAC-1450377 (DIANA/HEP) and PHY-1520942 (US-CMS LHC Ops).

Thanks especially to the gracious help of Uproot contributors (including the original repository).


Jim Pivarski

πŸ’» πŸ“– πŸš‡ 🚧

Pratyush Das

πŸ’» πŸš‡

Chris Burr

πŸ’» πŸš‡

Dmitri Smirnov

πŸ’»

Matthew Feickert

πŸš‡

Tamas Gal

πŸ’»

Luke Kreczko

πŸ’» ⚠️

Nicholas Smith

πŸ’»

Noah Biederbeck

πŸ’»

Oksana Shadura

πŸ’» πŸš‡

Henry Schreiner

πŸ’» πŸš‡ ⚠️

Mason Proffitt

πŸ’» ⚠️

Jonas Rembser

πŸ’»

benkrikler

πŸ’»

Hans Dembinski

πŸ“–

Marcel R.

πŸ’»

Ruggero Turra

πŸ’»

Jonas RΓΌbenach

πŸ’»

bfis

πŸ’»

Raymond Ehlers

πŸ’»

Andrzej Novak

πŸ’»

Josh Bendavid

πŸ’»

Doug Davis

πŸ’»

Chao Gu

πŸ’»

Lukas Koch

πŸ’»

Michele Peresano

πŸ’»

Edoardo

πŸ’»

JMSchoeffmann

πŸ’»

alexander-held

πŸ’»

Giordon Stark

πŸ’»

Ryunosuke O'Neil

πŸ’»

ChristopheRappold

πŸ“–

Cosmin Deaconu

⚠️ πŸ’»

Carlos Pegueros

πŸ“– πŸ’‘ ⚠️ βœ…

πŸ’»: code, πŸ“–: documentation, πŸš‡: infrastructure, 🚧: maintainance, ⚠: tests and feedback, πŸ€”: foundational ideas.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.