Commit Graph
9 Commits
Author SHA1 Message Date
Erik Fröjdh 89b7a9ef20 Split the python bindings into parallel translation units
python/src/module.cpp was one translation unit instantiating every cluster
size and value type; it compiled for 38 s and was the critical path of the
whole build. The bindings now live in bind_io.cpp (files, geometry, pixel
maps, calibration, test probes), bind_hist.cpp, bind_pedestal.cpp,
bind_fit.cpp, bind_eta.cpp and one bind_cluster_NxN.cpp per cluster size,
with the entry points declared in bindings.hpp and called from module.cpp
in the same order as before. The DEFINE_CLUSTER_BINDINGS macros moved to
bind_cluster_common.hpp.

Headers that several units include needed small fixes: allocate_image_data
and define_corner_enum are inline, the file-reader entry point is not, and
np_helper.hpp, bind_Defs.hpp, bind_FastPedestal.hpp,
bind_PedestalTrackingPixelHistogram.hpp and bind_ClusterFileSink.hpp now
include what they use, in particular pybind11/stl/filesystem.h for the
std::filesystem::path arguments they bind (previously supplied by include
order in module.cpp).

The module's exported names, types and docstrings are identical (verified
by dumping all 1948 of them), both test suites pass, and a clean Release
build with tests drops from 68 s to 42 s; the longest unit now takes 13 s
and the remaining 19 s is pybind11's LTO link.
2026-10-06 21:50:33 +02:00
Erik Fröjdh f2db33365e bindings for xy 2026-10-04 09:54:55 +02:00
Erik Frojdh 516b922b38 updated licensing info 2026-09-24 09:09:37 +02:00
Erik Fröjdhandmazzol_a 0dc72634a9 Reject raw files without padding if discard partial is not set (#374)
Build on RHEL9 / build (push) Successful in 3m3s
Build on RHEL8 / build (push) Successful in 3m25s
Run tests using data on local RHEL8 / build (push) Successful in 4m21s
Build on local RHEL8 / build (push) Successful in 3m5s
We have no code in aare to deal with RawFiles that have missing packets
if they are not padded to full size or frames with packet loss dropped.

Added: 
- check that we don't try to read files that are not supported
- python bindings for frame discard policy

at least we get the check in: 
closes #171

---------

Co-authored-by: AliceMazzoleni99 <alice.mazzoleni@psi.ch>
2026-09-18 17:06:11 +02:00
mazzol_aandErik Fröjdh 86db375948 python repr for Eta, Cluster (#367)
Build on RHEL9 / build (push) Successful in 2m40s
Build on RHEL8 / build (push) Successful in 3m15s
Run tests using data on local RHEL8 / build (push) Successful in 4m15s
Build on local RHEL8 / build (push) Successful in 2m56s
- python string repr for Cluster and Eta
- Context manager for RawMasterFile 
- slice operator for ROI

---------

Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
2026-09-10 12:18:27 +02:00
mazzol_a 4eb2bfcfcc enum TiminMode same as in slsDetectorPackage (#360)
Build on RHEL9 / build (push) Successful in 2m36s
Build on RHEL8 / build (push) Successful in 3m19s
Run tests using data on local RHEL8 / build (push) Failing after 4m13s
Build on local RHEL8 / build (push) Successful in 2m53s
**BugFix: **
- enum TimingMode same as in slsDetectorPackage 
- supports reading all timing modes from RawMasterFile
2026-09-04 12:19:00 +02:00
mazzol_aandErik Fröjdh 641ef047b5 Dev/filereading for disabled udp (#342)
Build on RHEL9 / build (push) Successful in 2m41s
Build on RHEL8 / build (push) Successful in 3m15s
Run tests using data on local RHEL8 / build (push) Failing after 4m13s
Build on local RHEL8 / build (push) Successful in 2m53s
- handles file reading of disabled udp ports 
- adds members disabled_udp_ports in master file as an optional 
- adds member diasbled_udp_port_types in master file as an optional
- Treats enabled udp ports as ROIs 
- merges/combines consecutive ROis into one 

### To discuss: 

- right now can only handle either ROI or disabled udp ports (disabled
udp ports has higher precedence)
- Should Frames in File be removed from Master File as value is nonsense
for disabled udp ports

---------

Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
2026-09-03 14:14:57 +02:00
mazzol_a b4686e6b85 added moench05 defs (#333)
Build on RHEL9 / build (push) Successful in 2m37s
Build on RHEL8 / build (push) Successful in 3m16s
Run tests using data on local RHEL8 / build (push) Successful in 3m56s
Build on local RHEL8 / build (push) Successful in 2m42s
- add moench05 chip/chiptestboard defs
2026-06-26 17:43:06 +02:00
mazzol_a 2139e5843c Dev/stuff from pyctbgui (#273)
Build on RHEL8 / build (push) Successful in 2m23s
Build on RHEL9 / build (push) Successful in 2m35s
Run tests using data on local RHEL8 / build (push) Failing after 3m19s
Matterhorn10 Transform 
some other Transformations from pyctbGUI 
added method get_reading_mode for easier error handling in decoders 


## TODO: 

- proper error handling for all other decoders 
- proper documentation for all other decoders 
- refactoring all other decoders to store hard coded values in a Struct
ChipSpecification
2026-02-19 16:12:44 +01:00