Tools to inspect ROOT files with uproot
Project description
uproot-browser
uproot-browser is a plotext based command line library. Its aim is to enable a user to browse and look inside a ROOT file, completely via the terminal. It takes its inspiration from the ROOT object browser.
Installation
You can install this library from PyPI with pip
:
python3 -m pip install uproot-browser
You can also use pipx
to run the library without installing it:
pipx run uproot-browser
Features
uproot-browser currently provides the following features:
plot
can be used to display a plot.tree
can be used to display a tree.
Usage
-h
or --help
option:
uproot-browser -h
The help page is also shown if no argument or command is passed.
Usage: uproot-browser [OPTIONS] COMMAND [ARGS]...
Must provide a subcommand.
Options:
-h, --help Show this message and exit.
Commands:
plot Display a plot.
tree Display a tree.
Example
This example uses data from the scikit-hep-testdata package. It is placed in the same directory as the uproot-browser repository.
plot
command:
uproot-browser plot ../scikit-hep-testdata/src/skhep_testdata/data/uproot-issue213.root:gen_hits_z_pos
┌─────────────────────────────────────────────────────┐
21.0┤ ▐ │
│ ▐ │
17.5┤ ▐ │
│ ▐ │
14.0┤ ▐ │
│ ▐ │
10.5┤ ▐ │
│ ▐ │
│ ▐ │
7.0┤ ▐ │
│ ▐ │
3.5┤ ▐ │
│ ▐ │
0.0┤ ▐█▌ ▐ █ │
└┬────────────┬────────────┬────────────┬────────────┬┘
-59.9 -29.9 0.0 29.9 59.9
tree
command:
uproot-browser tree ../scikit-hep-testdata/src/skhep_testdata/data/uproot-issue213.root
📁 uproot-issue213.root
┣━━ 🌴 T (100)
┃ ┣━━ 🍁 eventPack JPetGeantEventPack
┃ ┣━━ 🍁 TObject (group of fUniqueID:uint32_t,
┃ ┃ fBits:uint8_t)
┃ ┣━━ 🍁 fUniqueID uint32_t
┃ ┣━━ 🍁 fBits uint8_t
┃ ┣━━ 🍁 fMCHits int32_t
┃ ┣━━ 🍃 fMCHits.fUniqueID uint32_t[]
┃ ┣━━ 🍃 fMCHits.fBits uint8_t[]
┃ ┣━━ 🍃 fMCHits.fEvtID int32_t[]
┃ ┣━━ 🍃 fMCHits.fScinID int32_t[]
┃ ┣━━ 🍃 fMCHits.fTrackID int32_t[]
┃ ┣━━ 🍃 fMCHits.fTrackPDGencoding int32_t[]
┃ ┣━━ 🍃 fMCHits.fNumOfInteractions int32_t[]
┃ ┣━━ 🍃 fMCHits.fGenGammaIndex int32_t[]
┃ ┣━━ 🍃 fMCHits.fGenGammaMultiplicity int32_t[]
┃ ┣━━ 🍃 fMCHits.fEneDep float[]
┃ ┣━━ 🍃 fMCHits.fTime float[]
┃ ┣━━ 🍃 fMCHits.fPosition TVector3[]
┃ ┣━━ 🍃 fMCHits.fPolarizationIn TVector3[]
┃ ┣━━ 🍃 fMCHits.fPolarizationOut TVector3[]
┃ ┣━━ 🍃 fMCHits.fMomentumIn TVector3[]
┃ ┣━━ 🍃 fMCHits.fMomentumOut TVector3[]
┃ ┣━━ 🍁 fMCDecayTrees int32_t
┃ ┣━━ 🍃 fMCDecayTrees.fUniqueID uint32_t[]
┃ ┣━━ 🍃 fMCDecayTrees.fBits uint8_t[]
┃ ┣━━ 🍁 fGenInfo JPetGeantEventInformation*
┃ ┣━━ 🍁 fEvtIndex uint32_t
┃ ┣━━ 🍁 fHitIndex uint32_t
┃ ┗━━ 🍁 fMCDecayTreesIndex uint32_t
┣━━ 📊 gen_XY TH2F (121 × 121)
┣━━ 📊 gen_XZ TH2F (121 × 121)
┣━━ 📊 gen_YZ TH2F (121 × 121)
┣━━ 📊 gen_gamma_multiplicity TH1F (10)
┣━━ 📊 gen_hit_eneDepos TH1F (750)
┣━━ 📊 gen_hit_time TH1F (100)
┣━━ 📊 gen_hits_xy_pos TH2F (121 × 121)
┣━━ 📊 gen_hits_z_pos TH1F (100)
┣━━ 📊 gen_lifetime TH1F (100)
┣━━ 📊 gen_prompt_XY TH2F (121 × 121)
┣━━ 📊 gen_prompt_XZ TH2F (121 × 121)
┣━━ 📊 gen_prompt_YZ TH2F (121 × 121)
┗━━ 📊 gen_prompt_lifetime TH1F (100)
Development
See CONTRIBUTING.md for details on how to set up a development environment.
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
Built Distribution
File details
Details for the file uproot_browser-0.3.0.tar.gz
.
File metadata
- Download URL: uproot_browser-0.3.0.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c7561128bab7334321d6b81b03dbcb5a1af7c2752daac6d7dbf2f63dc1359bd |
|
MD5 | 74c92852454de461ab1ed42c5f7fc7ad |
|
BLAKE2b-256 | 5983bee6ad2e9b21b9749822c9353cf2803340565c9331f7a750fa5e75115838 |
File details
Details for the file uproot_browser-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: uproot_browser-0.3.0-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e92f69263111709643354a6006c78714af43222933e4941d51bea3dfe2e4fc6 |
|
MD5 | e91bc7c5a1275509b657f0f2a65e93dd |
|
BLAKE2b-256 | 81044eb1bd768c8247b0de8d31263da1160ab20708a044ddfca9c367a5b696ed |