NCU High Energy Physics tools for muography and related analysis.
Project description
ncuhep
A small high-energy / astroparticle utilities library with a focus on muography and dimension-aware units.
The two main pieces are:
ncuhep.muography– an end-to-end muography pipeline
from raw DAQ_Mu.txtfiles → reconstructed tracks → Monte Carlo basis → flux map Φ(θₓ, θᵧ).ncuhep.units– a lightweight units system (Length, Time, Flux, …)
with SI storage, attribute-style unit access, and dimensional arithmetic.
Features
Muography (ncuhep.muography)
-
Detector geometry & configuration
PlaneDetector– detector geometry, pixel sizes, layer positions, channel → pixel mapping.MuTxtFormat– description of your_Mu.txtDAQ format (columns, bit sizes, dtypes).AnalysisConfig– time windows and multiplicity cuts for event building.
-
Reconstruction pipeline
parser– raw_Mu.txt→ timestamped hit records + live time.identifier– hit list → cleaned, coincident events.tracker– events → straight-line tracks in 3D with χ².
-
Monte Carlo basis & geometric factor
MonteCarloRenderer– simulates straight muons through the same geometry, producing:- a 4D response basis
basis[i_meas_x, i_meas_y, i_inc_x, i_inc_y] - a geometric factor map
G(θₓᶦⁿᶜ, θᵧᶦⁿᶜ)in m²·sr
- a 4D response basis
- Optional multi-GPU acceleration via Numba/CUDA.
-
Flux reconstruction
- Combine reconstructed tracks + basis + geometric factor →
flux map Φ(θₓ, θᵧ) in units of counts·m⁻²·s⁻¹·sr⁻¹.
- Combine reconstructed tracks + basis + geometric factor →
Units (ncuhep.units)
- SI-based internal storage for each quantity (Length, Time, Mass, Flux, …).
- Attribute-based access to units:
L.mm = 50,L.m,T.s,T.h,ρ.g_cm3,Φ.counts_m2_s_sr, …
- Automatic dimensional arithmetic:
Length * Length → AreaMass / Volume → DensityCounts / (Area * Time * SolidAngle) → Flux
- Generic fallback type (
GenericQuantity) for any unregistered dimension. - Basic support for custom units attached at runtime (e.g. “pixel” → 50 mm, “counts_cm2_min_sr”, …).
License
This project is currently distributed under the NCUHEP Research Read-Only License.
In short:
- ✅ You may download, run, and study the code for personal, educational, or academic research.
- ❌ You may not redistribute the code or modified versions of it.
- ❌ You may not use the code for commercial purposes.
- 📑 If you use the software or results produced by it in a publication or presentation, citation is mandatory (see the recommended citation in the LICENSE file).
The full legal terms are in LICENSE.
Author: Phay Kah Seng – phay_ks@icloud.com
Installation
From PyPI:
pip install ncuhep
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ncuhep-0.2.1.tar.gz.
File metadata
- Download URL: ncuhep-0.2.1.tar.gz
- Upload date:
- Size: 95.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2077bdeebbc0f20044289b8c78e5891d1e606914444b10b8702e6f9c625c6b6d
|
|
| MD5 |
1aab8777cd8462904540a8e044f71290
|
|
| BLAKE2b-256 |
9bea6e434bcb85b82910e7036e4df7cda891c629d7e5968e43b1750c1e95364c
|
File details
Details for the file ncuhep-0.2.1-py3-none-any.whl.
File metadata
- Download URL: ncuhep-0.2.1-py3-none-any.whl
- Upload date:
- Size: 103.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
616927df86e43f62993b331c42040f2188cd23da014f34785a511cb2503d0c76
|
|
| MD5 |
5b9c4cff0f30b564fb8b449815c4f46f
|
|
| BLAKE2b-256 |
198975dbf31bb5dedb73acf2fa6423ae532ef801b0f408486a5a3148bc27f29d
|