luckyjim / BROOT

ROOT file browser, format defined and used by the CERN collaboration.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BROOT presentation

BROOT is a viewer / browser for ROOT files, format defined and used by CERN collaboration.

BROOT is an alternative to the TBrowser tool

BROOT doesn't use the ROOT library but the IO-specific library uproot, which allows for easy and lightweight installation.

BROOT GUI

Table for each TTree

BROOT_table

Action "Print"

This action can be applied on small array,

BROOT_print

else you can try another actions of plots.

Basic plots

Range of plot is configurable with GUI, same syntax as numpy array. Matplotlib is used to create the figures.

Action "Plot 1D"

For each dimension, you must define a range with python/numpy convention or an index.

We apply the numpy flatten function to the final array to obtain a 1D array.

You can have 3 representations of the 1D array:

  • plot by sample
  • power spectrum density
  • histogram

Plot sample

BROOT_1d

Power spectrum density

You can configure the frequency of sampling with GUI.

BROOT_1d

Histogram

BROOT_1d

Action "Plot point"

With this action you can plot points in 2D or 3D space. For each dimension, you must define a range with python/numpy convention or an index. The definition of axis x, y and optionaly z must be in the same dimension with syntax:

  • x=integer ; y=integer

"=" is optional, it's 2 definitions are equivalent:

  • x=0 ; y=1
  • x0 ; y1

The global shape for each axis must be a 1D array, so the symbol ":" must only appear once in one of the dimensions.

BROOT_point2

For 3 dimensions:

  • x=integer ; y=integer ; z=integer

the associated figure is interactive, it allows you to choose your viewing angle

BROOT_point3

Action "Image"

You must defined x axis and y axis in different dimension. By default "x" in dimension means takes all data, like "x=:".

You can defined range after x or y, example:

  • y=75:125

BROOT_image

Installation

Check if tkinter library is correctly installed with

python -m tkinter

else see installation documentation

upgrading pip and setuptools packages can help

pip install --upgrade setuptools pip

then BROOT installs very simply with pip install

python -m pip install git+https://github.com/luckyjim/BROOT.git 

run BROOT in a terminal with this command

BROOT.py

Update version

python -m pip uninstall BROOT
python -m pip install git+https://github.com/luckyjim/BROOT.git 

Problems

Type Error when open root file ?

Probably you need to update uproot version

python -m pip install --upgrade uproot

Other ROOT file viewer / browser

About

ROOT file browser, format defined and used by the CERN collaboration.

License:GNU General Public License v2.0


Languages

Language:Python 100.0%