Skip to main content

Utilities for high energy physics

Project description

heputl

PyPI version

A Python utility package for high-energy physics (HEP) analysis, providing tools for data preprocessing, plotting, and statistics.


Overview

heputl is a modular Python package designed to streamline common tasks in HEP data analysis. It includes utilities for:

  • Plotting: Publication-quality 1D and 2D histograms, graphs, and overlays using matplotlib and mplhep.
  • Data Utilities: Preprocessing helpers, string constants, and toy data generators.
  • Statistics: Functions for statistical analysis of HEP datasets.
  • Logging: Simple logging setup for scripts and notebooks.

Installation

You can install the latest release from PyPI:

pip install heputl

Or, for the latest development version:

git clone https://github.com/kingusiu/physkiutl.git
cd physkiutl
pip install -e .

Dependencies are managed via pyproject.toml.


Usage

After installation, simply import modules as needed in your analysis scripts or notebooks:

from heputl.plotting.oneD import plot_feature_hist_for_n_samples
from heputl.logging import get_logger

For Jupyter notebooks, if you are working from the source tree, ensure the src directory is in your PYTHONPATH:

import sys, os
sys.path.insert(0, os.path.abspath(os.path.join(os.pardir, "src")))

Modules

  • heputl.plotting: 1D and 2D plotting utilities
  • heputl.dats: Toy data and statistics
  • heputl.utils: Preprocessing and constants
  • heputl.logging: Simple logger for scripts and notebooks

Demos

Demos can be found under notebook.

plot_feature_hist_for_for_n_samples_demo Notebook

This notebook demonstrates how to visualize the distribution of a specific feature in your dataset using histograms.

  • Creating a demo dataset
  • Plotting a histogram to observe the feature's distribution

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

heputl-0.1.0.tar.gz (565.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

heputl-0.1.0-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file heputl-0.1.0.tar.gz.

File metadata

  • Download URL: heputl-0.1.0.tar.gz
  • Upload date:
  • Size: 565.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for heputl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 de5dd7ebff756537caa713451e0cf3c4c8e0bccf2c632443d4575b0129c9fa74
MD5 47211990c3b7eb3db6687a4553a9af3c
BLAKE2b-256 8da9c81485a096de164f0491bfc226040ce81dbcbf62b70a4c13bdc2dd4bfe1d

See more details on using hashes here.

File details

Details for the file heputl-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: heputl-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for heputl-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 780c784cf5dd63c8f9983b0f71708288b0a946f4c6078a290de014f1e08e603e
MD5 96fa7021301765c405c6a6224d570c34
BLAKE2b-256 0e29583c287eb590c63f91f464cef1da10c07f8e35279c8866101da49b2d48d8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page