Python package for iterative unfolding
Project description
PyUnfold
PyUnfold is a Python implementation the D’Agostini iterative unfolding method outlined in
G. D'Agostini, “A Multidimensional unfolding method based on Bayes' theorem”, Nucl. Instrum. Meth. A 362 (1995) 487
Installation
The latest development version of PyUnfold can be installed directly from GitHub
pip install git+https://github.com/jrbourbeau/pyunfold.git
or you can fork the GitHub repository and install PyUnfold on your local machine via
git clone https://github.com/<your-username>/pyunfold.git
pip install pyunfold
Quickstart
from pyunfold import iterative_unfold
# Counts distributions
data = [100, 150]
data_err = [10, 12.2]
# Response matrix
response = [[0.9, 0.1],
[0.1, 0.9]]
response_err = [[0.01, 0.01],
[0.01, 0.01]]
# Detection efficiencies
efficiencies = [1, 1]
efficiencies_err = [0.01, 0.01]
# Perform iterative unfolding
unfolded = iterative_unfold(data, data_err,
response, response_err,
efficiencies, efficiencies_err)
The returned unfolded result is a dictionary containing:
unfolded
: Unfolded cause distributionstat_err
: Statistical (Poisson) errorssys_err
: Systematic errors associated with limited statistics in the response matrix
print(unfolded)
{'unfolded': array([ 94.48002622, 155.51997378]),
'sys_err': array([0.66204237, 0.6620424 ]),
'stat_err': array([11.2351567 , 13.75617997])}
License
Copyright (c) 2018 James Bourbeau, Zigfried Hampel-Arias
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
PyUnfold-0.1.tar.gz
(15.8 kB
view hashes)
Built Distribution
PyUnfold-0.1-py2.py3-none-any.whl
(19.5 kB
view hashes)
Close
Hashes for PyUnfold-0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9ed13d8ec4a642695a3ac26b2fe5cb8f045e77c9c1e2cbe3cd5106083629de6 |
|
MD5 | 1708b6915500e61097c933bf2a7556eb |
|
BLAKE2b-256 | da38f2f23962681c3c4c2da54ba4bab517411dabf843b83c2026b2e09ae33c79 |