Generic system to perform streaming transformations on histograms
Project description
histgrinder
Generic system to perform streaming transformations on histograms
Features:
- core does not depend on any histogram library or input/output format; plugins can be written (and these need not live in this package). Probably most useful if histograms live in a hierarchical namespace but this is not necessary. Example implementation to read/write ROOT files provided.
- intended for streaming, e.g. for online environments where histograms are updated asynchronously.
- pattern matching makes it easy to apply the same transformation to multiple histograms
- no code needed to configure
This is still very much early-release software, you can test it as follows (e.g. should work on lxplus, if you have a CERN account):
- set up ROOT and Python (>=3.6) in a way that you like. For ATLAS people you can set up a master nightly.
- install (not needed if you are on ATLAS and using master,2020-10-20T2101 or later):
python3 -m pip install -U --user histgrinder==0.1.3
- prepare a sample ROOT file:
python3 -m histgrinder.make_sample_file
- download an example YAML configuration from https://raw.githubusercontent.com/ponyisi/histogram_postprocessing/master/resources/example.yaml
- run. The following will postprocess
example.root
, created above, according to theexample.yaml
configuration, ignoring the top-level path "prefix", then add the outputs toexample.root
:
python3 -m histgrinder.engine example.root example.root -c example.yaml --prefix prefix
- the transformation above will perform a number of operations on the histograms of the input file. For example, 20 different histogram divisions are configured with the first config block.
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
histgrinder-0.1.3.tar.gz
(9.5 kB
view hashes)
Built Distribution
Close
Hashes for histgrinder-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c44161caf9de12f1a9b10b6d6fb70b087631e057ba95de1d74a5411d0a69f95 |
|
MD5 | ade0992b7d610bb0ea330753c9d5ef14 |
|
BLAKE2b-256 | c8c28ea4e2c3d8e0e4f694221dd39e28c2f9da3c9df4ede48637ac31dc0faefd |