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.2.tar.gz (101.1 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.2-py3-none-any.whl (109.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ncuhep-0.2.2.tar.gz
  • Upload date:
  • Size: 101.1 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.2.tar.gz
Algorithm Hash digest
SHA256 68105748a902d977e64b0b3865f3008f9adfd43f55027a00e3049d334985e72e
MD5 0b6ca9362b9334b2e8f34980b6641a44
BLAKE2b-256 e48aedd94fe37dab70b35ee77ae7efc00d57eaa6c95c6ab00b6d10d0224206aa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ncuhep-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 109.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 af5ead556788d56490fb7ae68f74ca07ee196c7eca864c065a12cefd6f438066
MD5 516fd4a8210e3fe3c5b63c096dc2f393
BLAKE2b-256 cc385a6d4fe2500ebbba1658ba1175dae6753e69d183aeeab5ab27b6d3e85f45

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