Skip to main content

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

  1. Clone the repository (see GitLab docs for details).
git clone git@git.km3net.de:laphecetche/detector.git
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

km3detector-0.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

km3detector-0.1.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (673.0 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

km3detector-0.1.0-cp314-cp314-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

km3detector-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (668.5 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

km3detector-0.1.0-cp313-cp313-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

km3detector-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (668.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

km3detector-0.1.0-cp312-cp312-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

km3detector-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (668.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

km3detector-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

km3detector-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (669.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

km3detector-0.1.0-cp310-cp310-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

km3detector-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (668.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

km3detector-0.1.0-cp39-cp39-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

km3detector-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (669.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file km3detector-0.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for km3detector-0.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 97799ff20f95305628e508831a7247d550c8440d73ecde5b229c52f7745e46a9
MD5 dfc82a63415897bcd84e0b916d626a65
BLAKE2b-256 981096b1edc743ff3dc6eb32197af991b512ef1177a0456ce3efb19fe1b76055

See more details on using hashes here.

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

File hashes

Hashes for km3detector-0.1.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 71d507dbc7c84a94ee9e1caa139c45bac6d0c3bde56aeb6b8b96c5fcde677212
MD5 a4797c8c169fcb828cf29c5f94837334
BLAKE2b-256 586e9cc0e00700f18bad68297ef8f5a5faa541a6992a546121f89bd25e64cc6b

See more details on using hashes here.

File details

Details for the file km3detector-0.1.0-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for km3detector-0.1.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ab5cb115c4cfe3dc30d910580a5424639498213a99235398e0662343a3fa5856
MD5 63669e9aa8fb1c3ff74cbd0416b7a517
BLAKE2b-256 08ec9f3fd1735d498ef44d2efdc4d86ab3b2ef0c783c4b5799ed5faa0f34ac08

See more details on using hashes here.

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

File hashes

Hashes for km3detector-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ac00cbd1855cec8b03ee80f11439ea9439077932f892fa470104567040c852c9
MD5 513e9292c81140e6745bbef523a1387d
BLAKE2b-256 a0de176af467aa2ae1d7170eea004ae0ca8d56f4f822574a0bf9e2d4d1100f9c

See more details on using hashes here.

File details

Details for the file km3detector-0.1.0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for km3detector-0.1.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cc450bdc5b975ad3410803186aa2d7dd80706cee157fd625c8d848844ff5d665
MD5 550f46c559124988f894ec54de49d9a4
BLAKE2b-256 f7c9a6e00d8ea4bf65a510950dc3fae3411f32af588497660d77607b9baec3e9

See more details on using hashes here.

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

File hashes

Hashes for km3detector-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 42714c2a6cdac01a1449ae5fbc7bfe38f087826cac298032d8b2e90cc8e5a46b
MD5 97535add80b3e007cacb105163b1fb39
BLAKE2b-256 b15e2bbfa74dba00ed0dd7bf10aefee0f101255c31b3ebef703af23447220c26

See more details on using hashes here.

File details

Details for the file km3detector-0.1.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for km3detector-0.1.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 68a3e89a45e55266bb22f011469a59729b0996bc30c61d6efaa141c5425c12a5
MD5 e102fd81e60d2e9fc73e3c7f7ed2f26a
BLAKE2b-256 4aea9c8f82bd61b4475740c1889358916a4d97119f8b36f5a6248cb21c1deeaa

See more details on using hashes here.

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

File hashes

Hashes for km3detector-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c0ca3b202eb7733f3dffcce49e95a4a1312c087e5a461e52bae1af63e3e6af44
MD5 e7005a0a15ec00e0f0399fcd5e475bda
BLAKE2b-256 9b970388f2697a16a56208f72609cbd6947dcd45cf7fabaa1beeb98c7fbdc155

See more details on using hashes here.

File details

Details for the file km3detector-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for km3detector-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c72dff667e06a70aa433a594a880610f3ce1d38f69b59de07fd58b0bd3efc18e
MD5 a01e558374f28b39e69f68c519ed9075
BLAKE2b-256 dec8378f865f95b1d3c1675273ce889ecdd1f7893653e80d1b0a96cc6fb46bbb

See more details on using hashes here.

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

File hashes

Hashes for km3detector-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 44db7a0a303e8c585f081d53b6491064182202bcc2572561bec53c0deeaba34f
MD5 f3a4cc9cccc4249499fa4199df4a190a
BLAKE2b-256 44acbe255c34bcfa6bff9d2e9b3704b95f93f9201fad90889fcc00886987adfd

See more details on using hashes here.

File details

Details for the file km3detector-0.1.0-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for km3detector-0.1.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 972d69d31ef248514f49ab2444492a00a712aa92af78ea17f6d0a5c6c3c7bab7
MD5 d4e4a61d7ab5b63f2110d421fe6c8494
BLAKE2b-256 7888bae7602ffc0148ca96331235a7c2f0d65df84b579b981baf059f77c874b5

See more details on using hashes here.

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

File hashes

Hashes for km3detector-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4b96f28acba3c0ec7e56616112e2db1d6863c7361b2edb213a99d9c2cbee1d23
MD5 e78ece59d6037fc473be2ab31a1ca092
BLAKE2b-256 a969d2433db57518285cef2dd5f527acb452f8e39daf652468c8c09f3fa335d1

See more details on using hashes here.

File details

Details for the file km3detector-0.1.0-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for km3detector-0.1.0-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e6a17b558139f2b9afcd72808c483f6b4928ff9dfa8c5ba125935ab741615274
MD5 3f81020e7a2d6ae028f9d8d29191eb8d
BLAKE2b-256 5a11cce746f267b530a381acd651462c953d3f3cb5732677a67cb4ec15c4c329

See more details on using hashes here.

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

File hashes

Hashes for km3detector-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 11c305b0b8cb6bf5a21501f1ffdac18fa2e9113de7f9590c708da2b30386b07c
MD5 22ff1214ba776999664d0aaafc997bc0
BLAKE2b-256 28cff232608165e4bd39502103f2f3453c564befdecfd6896896396173870fba

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