Skip to main content

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.txt files → 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.txt DAQ 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
    • Optional multi-GPU acceleration via Numba/CUDA.
  • Flux reconstruction

    • Combine reconstructed tracks + basis + geometric factor →
      flux map Φ(θₓ, θᵧ) in units of counts·m⁻²·s⁻¹·sr⁻¹.

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 → Area
    • Mass / Volume → Density
    • Counts / (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 Sengphay_ks@icloud.com

Installation

From PyPI:

pip install ncuhep

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

ncuhep-0.2.0.tar.gz (95.3 kB view details)

Uploaded Source

Built Distribution

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

ncuhep-0.2.0-py3-none-any.whl (103.2 kB view details)

Uploaded Python 3

File details

Details for the file ncuhep-0.2.0.tar.gz.

File metadata

  • Download URL: ncuhep-0.2.0.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

Hashes for ncuhep-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fffaa29193932c0200e0a20090578fd9e302a0b2fe3bec3ecf97ec5dc5123abd
MD5 32f6e5ca9b46015a0a089f7251896aa1
BLAKE2b-256 d4fa5b4180ff4612a29336755d5a90031d11ce9ff3aca96e0b97f8663cbd2e21

See more details on using hashes here.

File details

Details for the file ncuhep-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ncuhep-0.2.0-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

Hashes for ncuhep-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ee58e28d1ce728e51d6a26fffd103a8a350d6229b8429e061c4848706cf8671
MD5 8bf3a5448ab7313528a52a0d142eb96e
BLAKE2b-256 c2ca9f21b801e54106c486b157a1ef55639a828e67b204de22686e8e3d89fcfe

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