pybumphunter

Python implementation of the BumpHunter algorithm used by HEP community.

https://github.com/scikit-hep/pybumphunter

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.9%) to scientific vocabulary
Last synced: 9 months ago · JSON representation ·

Repository

Python implementation of the BumpHunter algorithm used by HEP community.

Basic Info
  • Host: GitHub
  • Owner: scikit-hep
  • License: bsd-3-clause
  • Language: Jupyter Notebook
  • Default Branch: master
  • Homepage:
  • Size: 4.9 MB
Statistics
  • Stars: 17
  • Watchers: 9
  • Forks: 10
  • Open Issues: 5
  • Releases: 5
Created about 5 years ago · Last pushed 9 months ago
Metadata Files
Readme License Citation

README.md

pyBumpHunter

Binder Test PyPI DOI

This is a python version of the BumpHunter algorithm, see arXiv:1101.0390, G. Choudalakis, designed to find localized excess (or deficit) of events in a 1D or 2D distribution.

The main BumpHunter function will scan a data distribution using variable-width window sizes and calculate the p-value of data with respect to a given background distribution in each window. The minimum p-value obtained from all windows is the local p-value. To cope with the "look-elsewhere effect" a global p-value is calculated by performing background-only pseudo-experiments.

The BumpHunter algorithm can also perform signal injection tests where more and more signal is injected in toy data until a given signal significance (global) is reached (signal injection not available in 2D yet).

Content

  • pyBumpHunter : The pyBumpHunter package
  • example : Folder containing a set of example scripts and notebooks
  • example/results : Folder containing the outputs of example scripts
  • test : Folder containing the testing scripts (based on pytest)
  • data/data.root : Toy data used in the examples and tests
  • data/gen_data.C : Code used to generate the toy data with ROOT

Dependencies

Requires Python >= 3.8.

BumpHunter depends on the following python libraries :

  • numpy
  • scipy
  • matplotlib

pyBumpHunter wiki

Examples

The examples provided in example.py and test.ipynb require the uproot package in order to read the data from a ROOT software file.

The data provided in the example consists of three histograms: a steeply falling 'background' distribution in a [0,20] x-axis range, a 'signal' gaussian shape centered on a value of 5.5, and a 'data' distribution sampled from background and signal distributions, with a signal fraction of 0.15%. The data file is produced by running gen_data.C in ROOT.

In order to run the example script, simply type python3 example.py in a terminal.

You can also open the example notebook with jupyter or binder.

  • Bump hunting:

  • Tomography scan:

  • Test statistics and global p-value:

See the wiki for a detailed overview of all the features offered by pyBumpHunter.

To do list

  • Run BH on 2D histograms

Authors and contributors

Louis Vaslin (main developper), Julien Donini

Thanks to Samuel Calvet for his help in cross-checking and validating pyBumpHunter against the (internal) C++ version of BumpHunter developped by the ATLAS collaboration.

Owner

  • Name: Scikit-HEP Project
  • Login: scikit-hep
  • Kind: organization
  • Email: scikit-hep-forum@googlegroups.com

A community project for High Energy Physics data analysis in Python

Citation (CITATION.cff)

cff-version: 1.2.0
title: "pyBumpHunter"
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
abstract: "Python implementation of the BumpHunter algorithm used by the HEP community."
doi: "10.5281/zenodo.7684558"
authors:
- family-names: "Vaslin"
  given-names: "Louis"
  affiliation: "Laboratoire de Physique de Clermont"
  orcid: "https://orcid.org/0000-0001-9161-7716"
  email: "louis.vaslin@clermont.in2p3.fr"
repository-code: "https://github.com/scikit-hep/pyBumpHunter"
keywords:
  - python
  - BumpHunter algorithm
  - scikit-hep
license: "BSD-3-Clause"

GitHub Events

Total
  • Delete event: 1
  • Push event: 2
  • Pull request event: 3
  • Pull request review event: 1
  • Fork event: 2
  • Create event: 2
Last Year
  • Delete event: 1
  • Push event: 2
  • Pull request event: 3
  • Pull request review event: 1
  • Fork event: 2
  • Create event: 2

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 5
  • Total pull requests: 15
  • Average time to close issues: about 1 year
  • Average time to close pull requests: 18 days
  • Total issue authors: 4
  • Total pull request authors: 6
  • Average comments per issue: 7.2
  • Average comments per pull request: 2.27
  • Merged pull requests: 12
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • eduardo-rodrigues (2)
  • jonas-eschle (1)
  • jmduarte (1)
  • franciscosili (1)
Pull Request Authors
  • lovaslin (5)
  • henryiii (4)
  • eduardo-rodrigues (3)
  • jonas-eschle (2)
  • dependabot[bot] (2)
  • jmduarte (1)
Top Labels
Issue Labels
documentation (1) enhancement (1)
Pull Request Labels
dependencies (3) documentation (1) CI (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 212 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 9
  • Total maintainers: 2
pypi.org: pybumphunter

Python implementation of the BumpHunter algorithm used by HEP community.

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 212 Last month
Rankings
Dependent packages count: 10.0%
Forks count: 12.5%
Stargazers count: 16.5%
Average: 17.6%
Dependent repos count: 21.7%
Downloads: 27.0%
Maintainers (2)
Last synced: 9 months ago

Dependencies

.github/workflows/automated_build.yml actions
  • actions/checkout v1 composite
  • actions/download-artifact v2 composite
  • actions/upload-artifact v2 composite
  • pypa/gh-action-pypi-publish v1.4.2 composite
.github/workflows/automated_testing.yml actions
  • actions/checkout v1 composite
  • actions/setup-python v2 composite
pyproject.toml pypi
setup.py pypi
environment.yml conda
  • awkward
  • cachetools
  • jupyter
  • matplotlib
  • numpy
  • pybumphunter
  • python
  • scipy
  • uproot