uLib¶
uLib is the base toolkit library for the CMT (Cosmic Muon Tomography) project, developed at the University of Padova and INFN Sezione di Padova, Italy.
It provides:
- Core – object model, timers, configuration, UUID utilities.
- Math – linear algebra (Eigen3), structured grids, voxel images, ray-tracing, image filters.
- Python bindings – full pybind11 interface for scripting and analysis workflows.
- Optional CUDA acceleration for voxel filtering (transparent RAM ↔ VRAM management).
Quick Start¶
Then in Python:
import uLib
# Core
timer = uLib.Core.Timer()
timer.Start()
# Math
grid = uLib.Math.StructuredGrid([10, 10, 10])
grid.SetSpacing([1.0, 1.0, 1.0])
img = uLib.Math.VoxImage([10, 10, 10])
img.SetValue(0, 3.14)
print(img.GetValue(0))
Documentation Sections¶
| Section | Description |
|---|---|
| Python – Installation | Environment setup, user install, developer build |
| Python – API Usage | Full API reference with examples |
| Python – Developer Guide | Adding bindings, running tests, build details |
| Python – Streaming Between Recipes | Stream ports, reading and writing them, a DataBuffer in between, live updates |
| Python – Agent Context (pyagent) | Tools and resources generated from the classes themselves, and the backend that calls them |
| Python – Agent Panel (agentchat) | gcompose's chat with Claude, Gemini or OpenCode, acting on the open scene |
| C++ Build – Usage & CUDA | CMake build, CUDA configuration |
| Geant4 integration: status and plan | What of Geant4 is integrated, what is missing, and the order to do the rest |
| Geant4 features as uLib objects | Sensitive detectors, scoring with filters, fields and limits, replicas and assemblies, parallel worlds and reflections -- with five runnable examples and ready-made scenes |
| Histograms and plots | Histograms and point sets, the ROOT proxies that draw them as curves and scatters, grouping several onto one pad and what may not share one, and arranging pads on a canvas |
| uprops – Property & Metadata Engine | Standalone properties, rich metadata, signaling, encoders/decoders, and proxy representations |
| DataSource – Raw & Embedded Data Storage | Universal data source abstraction, file linking, stream access, and self-contained scene packing (.gcx) |
| DataSink – Output Streams & Export Packaging | The write counterpart of DataSource: output port, format-identified encoding, embedded payloads, and context-wide flushing |
| DataSource/DataSink as Encoder–Decoder Components | Stage 1 implemented. TypeId, EncodingId, codec registry, native codec, self-describing envelope and object transfer to files and other processes; schema archives and FlatBuffers/protobuf still planned |