KM3NeT detector I/O library with nanobind Python bindings
Project description
detector
KM3NeT Detector Description Input Output Library (DETX/DATX/JSON).
Currently supports V1,V2,V3,V4 and V5 of the DETX specification and V5 of the yet-to-be-documented DATX format.
Project overview
Motivation
The detector description, giving information about detector position (including all individual PMTs) and timing calibration, is required in many places (e.g. calibration, reconstruction) in the KM3NeT processing pipelines.
There are two data formats of that detector description:
- an ASCII character based text format, called DETX, that is formally described
- a binary format, called DATX, that is being documented.
There are a few software implementations of reader/writer of those formats, in different languages, with various levels of completeness, that were developped in the past.
The purpose of this project is to provide a unified replacement for all previous implementations, centered exclusively on reading and writing detector description formats.
In particular, auxiliary manipulations of the detector geometry (such as rotating DOMs or stretching DUs) are not included in this library, in order to keep it lightweight and focused.
Since our core T0/T1 software is written in C++, this library is also implemented in C++. However, it also aims to provide idiomatic language bindings for Python and Julia.
Project structure
The C++ library interface is split in a couple of include files under km3net/detector :
- detector.h describes the main object of this library, representing the geometry of a KM3NeT @link km3net::detector::Detector Detector @endlink
- module.h describes a single @link km3net::detector::Module Module @endlink (either base or optical)
- detx.h offers read/write functions of detector from/to DETX files / streams
- datx.h offers read/write functions of detector from/to DATX files / streams
- json.h offers only write function of detector to JSON format.
The C++ implementation is under src/c++.
The Python bindings, created using the nanobind library, are in src/python.
While primarily intended as a library, a small helper executable is provided, which can convert to and from DETX/DATX, as well as to JSON. This executable also serves as an example of how to use the library. See km3net-detector --help.
km3net-detector --input v5.detx --output v5.json
Getting Started
Prerequisites
To build the C++ core library, you will need CMake. Other dependencies will be built if not already present on the system, see dependencies.cmake.
For the Python part, Python, pytest and cibuildwheel are required.
Build from repository
- Clone the repository (see GitLab docs for details).
git clone git@git.km3net.de:laphecetche/detector.git
- Build with CMake
cmake --workflow --preset release
Will generate a release version under install-release.
There's also a dev preset available.
Python wheels
The CI/CD is configured to generate Python wheels for Linux (macOS is planned) and upload them to PyPI (only for tagged versions).
Contributing
Please first read the Contributing Guidelines. For any requests and discussion points, you are invited to start an issues.
Contact
For collaboration-related questions, please use the issues or contact the maintainers as listed in the codemeta.
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 Distributions
Built Distributions
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 km3detector-0.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: km3detector-0.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.14t, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97799ff20f95305628e508831a7247d550c8440d73ecde5b229c52f7745e46a9
|
|
| MD5 |
dfc82a63415897bcd84e0b916d626a65
|
|
| BLAKE2b-256 |
981096b1edc743ff3dc6eb32197af991b512ef1177a0456ce3efb19fe1b76055
|
File details
Details for the file km3detector-0.1.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: km3detector-0.1.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 673.0 kB
- Tags: CPython 3.14t, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71d507dbc7c84a94ee9e1caa139c45bac6d0c3bde56aeb6b8b96c5fcde677212
|
|
| MD5 |
a4797c8c169fcb828cf29c5f94837334
|
|
| BLAKE2b-256 |
586e9cc0e00700f18bad68297ef8f5a5faa541a6992a546121f89bd25e64cc6b
|
File details
Details for the file km3detector-0.1.0-cp314-cp314-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: km3detector-0.1.0-cp314-cp314-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.14, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab5cb115c4cfe3dc30d910580a5424639498213a99235398e0662343a3fa5856
|
|
| MD5 |
63669e9aa8fb1c3ff74cbd0416b7a517
|
|
| BLAKE2b-256 |
08ec9f3fd1735d498ef44d2efdc4d86ab3b2ef0c783c4b5799ed5faa0f34ac08
|
File details
Details for the file km3detector-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: km3detector-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 668.5 kB
- Tags: CPython 3.14, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac00cbd1855cec8b03ee80f11439ea9439077932f892fa470104567040c852c9
|
|
| MD5 |
513e9292c81140e6745bbef523a1387d
|
|
| BLAKE2b-256 |
a0de176af467aa2ae1d7170eea004ae0ca8d56f4f822574a0bf9e2d4d1100f9c
|
File details
Details for the file km3detector-0.1.0-cp313-cp313-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: km3detector-0.1.0-cp313-cp313-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc450bdc5b975ad3410803186aa2d7dd80706cee157fd625c8d848844ff5d665
|
|
| MD5 |
550f46c559124988f894ec54de49d9a4
|
|
| BLAKE2b-256 |
f7c9a6e00d8ea4bf65a510950dc3fae3411f32af588497660d77607b9baec3e9
|
File details
Details for the file km3detector-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: km3detector-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 668.6 kB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42714c2a6cdac01a1449ae5fbc7bfe38f087826cac298032d8b2e90cc8e5a46b
|
|
| MD5 |
97535add80b3e007cacb105163b1fb39
|
|
| BLAKE2b-256 |
b15e2bbfa74dba00ed0dd7bf10aefee0f101255c31b3ebef703af23447220c26
|
File details
Details for the file km3detector-0.1.0-cp312-cp312-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: km3detector-0.1.0-cp312-cp312-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68a3e89a45e55266bb22f011469a59729b0996bc30c61d6efaa141c5425c12a5
|
|
| MD5 |
e102fd81e60d2e9fc73e3c7f7ed2f26a
|
|
| BLAKE2b-256 |
4aea9c8f82bd61b4475740c1889358916a4d97119f8b36f5a6248cb21c1deeaa
|
File details
Details for the file km3detector-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: km3detector-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 668.7 kB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0ca3b202eb7733f3dffcce49e95a4a1312c087e5a461e52bae1af63e3e6af44
|
|
| MD5 |
e7005a0a15ec00e0f0399fcd5e475bda
|
|
| BLAKE2b-256 |
9b970388f2697a16a56208f72609cbd6947dcd45cf7fabaa1beeb98c7fbdc155
|
File details
Details for the file km3detector-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: km3detector-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c72dff667e06a70aa433a594a880610f3ce1d38f69b59de07fd58b0bd3efc18e
|
|
| MD5 |
a01e558374f28b39e69f68c519ed9075
|
|
| BLAKE2b-256 |
dec8378f865f95b1d3c1675273ce889ecdd1f7893653e80d1b0a96cc6fb46bbb
|
File details
Details for the file km3detector-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: km3detector-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 669.1 kB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44db7a0a303e8c585f081d53b6491064182202bcc2572561bec53c0deeaba34f
|
|
| MD5 |
f3a4cc9cccc4249499fa4199df4a190a
|
|
| BLAKE2b-256 |
44acbe255c34bcfa6bff9d2e9b3704b95f93f9201fad90889fcc00886987adfd
|
File details
Details for the file km3detector-0.1.0-cp310-cp310-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: km3detector-0.1.0-cp310-cp310-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.10, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
972d69d31ef248514f49ab2444492a00a712aa92af78ea17f6d0a5c6c3c7bab7
|
|
| MD5 |
d4e4a61d7ab5b63f2110d421fe6c8494
|
|
| BLAKE2b-256 |
7888bae7602ffc0148ca96331235a7c2f0d65df84b579b981baf059f77c874b5
|
File details
Details for the file km3detector-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: km3detector-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 668.9 kB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b96f28acba3c0ec7e56616112e2db1d6863c7361b2edb213a99d9c2cbee1d23
|
|
| MD5 |
e78ece59d6037fc473be2ab31a1ca092
|
|
| BLAKE2b-256 |
a969d2433db57518285cef2dd5f527acb452f8e39daf652468c8c09f3fa335d1
|
File details
Details for the file km3detector-0.1.0-cp39-cp39-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: km3detector-0.1.0-cp39-cp39-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.9, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6a17b558139f2b9afcd72808c483f6b4928ff9dfa8c5ba125935ab741615274
|
|
| MD5 |
3f81020e7a2d6ae028f9d8d29191eb8d
|
|
| BLAKE2b-256 |
5a11cce746f267b530a381acd651462c953d3f3cb5732677a67cb4ec15c4c329
|
File details
Details for the file km3detector-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: km3detector-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 669.1 kB
- Tags: CPython 3.9, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11c305b0b8cb6bf5a21501f1ffdac18fa2e9113de7f9590c708da2b30386b07c
|
|
| MD5 |
22ff1214ba776999664d0aaafc997bc0
|
|
| BLAKE2b-256 |
28cff232608165e4bd39502103f2f3453c564befdecfd6896896396173870fba
|