Technical Reference

This section provides detailed technical specifications for rustpix.

Contents

  • HDF5 Schema - NeXus-compatible HDF5 file format specification

API Documentation

Rust API

Comprehensive Rust API documentation is available on docs.rs:

Python API

See the Python API chapter for comprehensive Python documentation.

Data Formats

Input: TPX3

Rustpix reads Timepix3 (TPX3) binary files. TPX3 files contain:

  • Hit packets (pixel coordinates, timestamp, ToT)
  • TDC packets (timing reference)
  • Metadata headers

Output Formats

FormatExtensionDescription
HDF5.h5, .hdf5NeXus-compatible, recommended for large datasets
Arrow.arrowApache Arrow IPC format
Parquet.parquetColumnar format, good for analytics
CSV.csvHuman-readable, simple export
Binary.bin, .datCompact, fastest I/O

Performance Characteristics

Throughput

OperationThroughputNotes
TPX3 parsing96M+ hits/secMemory-mapped, parallel
ABS clustering~20M hits/secSingle-threaded
Grid clustering~15M hits/secMulti-threaded, scales with cores
DBSCAN clustering~4M hits/secSpatial index overhead

Memory Usage

  • Streaming mode: Bounded memory, configurable via memory_fraction
  • Batch mode: ~100 bytes per hit for full processing
  • HDF5 export: Chunked writes, minimal peak memory

Version Compatibility

Rustpix VersionPythonRustmacOSLinuxWindows
1.0.x3.11+1.70+11.0+glibc 2.28+10+