Commit Graph
640 Commits
Author SHA1 Message Date
mazzol_a 795ae9046a Merge branch 'main' into dev/strixels/remap_simple
Build on RHEL9 / build (push) Successful in 2m56s
Build on RHEL8 / build (push) Successful in 3m57s
Run tests using data on local RHEL8 / build (push) Successful in 4m59s
2026-10-16 16:08:39 +02:00
mazzol_a 0686181f6b fixed documentation build 2026-10-16 16:08:00 +02:00
mazzol_a 6440f669d9 added getter for sensor_config 2026-10-16 15:50:28 +02:00
Erik Fröjdh d1e432f8ca Add gap pixel insertion for images in memory (#423)
Build on RHEL9 / build (push) Successful in 3m3s
Build on RHEL8 / build (push) Successful in 3m45s
Run tests using data on local RHEL8 / build (push) Successful in 4m46s
Build on local RHEL8 / build (push) Successful in 3m24s
Second part of splitting up dev/gap. Only the in-memory transform; no
reader changes.

- `GapPixels` and `ModuleGaps` configure 2 pixel gaps at the chip
boundaries inside each Jungfrau or Eiger module and, only when module
gaps are set, gaps between modules. Gap pixels get a fill value or, with
`split_counts`, half of the neighbouring double size pixel.
- `insert_gap_pixels` and `gapped_shape` apply the transform to an image
in memory. Gap positions follow detector coordinates, so a ROI receives
exactly the gaps that fall inside it.
- Python bindings, tests and docs for the above.

Chip and module sizes are fixed at 256 and 1024x512, so there is no
detector type or quad argument: an Eiger quad is 512x512 and its only
chip boundaries are at pixel 256.

Reading raw files with gaps comes in the next PR.
2026-10-15 10:31:45 +02:00
Erik Fröjdh 5ccda7955d Assemble raw frames through one placement path (#421)
Build on RHEL9 / build (push) Successful in 9m7s
Run tests using data on local RHEL8 / build (push) Successful in 4m33s
Build on RHEL8 / build (push) Successful in 9m53s
Build on local RHEL8 / build (push) Successful in 3m17s
First part of splitting up dev/gap. No gap pixels in here.

- Extract the frame number sync loop into
`RawFile::synchronized_frame_indices`.
- Replace the two placement branches keyed on the detector layout with
one loop. A part as wide as the ROI is read straight into the frame; a
narrower part goes through a scratch buffer sized once at open, instead
of a buffer allocated per frame.
- The "x pos not 0" implementation error is gone, since the offset is
computed for both paths.
2026-10-13 17:24:05 +02:00
Erik Fröjdh 4408fe95b0 Fixed failing tests due to updated bindings (#420)
Build on RHEL9 / build (push) Successful in 3m7s
Build on RHEL8 / build (push) Successful in 3m41s
Run tests using data on local RHEL8 / build (push) Successful in 4m35s
Build on local RHEL8 / build (push) Successful in 3m23s
- New python bindings return a (1,n_bytes) array instead of a 1d array
- Flatten on python side before transform
2026-10-13 15:00:45 +02:00
mazzol_aandErik Fröjdh f43e48cb90 added subview (#419)
Build on RHEL9 / build (push) Successful in 2m53s
Build on RHEL8 / build (push) Successful in 3m36s
Run tests using data on local RHEL8 / build (push) Failing after 4m32s
Build on local RHEL8 / build (push) Successful in 3m17s
- adds subview(ssize_t index) opeartor 
- returns subview with dropped dimension

---------

Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
2026-10-12 17:21:25 +02:00
Erik Fröjdh 0eca8328d7 Dev/sccache (#415)
Build on RHEL9 / build (push) Successful in 3m2s
Build on RHEL8 / build (push) Successful in 3m40s
Run tests using data on local RHEL8 / build (push) Failing after 4m38s
Build on local RHEL8 / build (push) Successful in 3m20s
- Use sccache: https://github.com/mozilla/sccache to speed up CI
- Not huge benefits for Windows but mac and linux really improves
2026-10-09 11:36:24 +02:00
Erik Fröjdh bf0aa4a3bf Added missing header guards (#414)
Build on RHEL9 / build (push) Successful in 2m55s
Build on RHEL8 / build (push) Successful in 3m38s
Run tests using data on local RHEL8 / build (push) Failing after 4m35s
Build on local RHEL8 / build (push) Successful in 3m20s
- Python extension. Originally left out since it didn't matter but good
practice for future
- to_string.hpp - this is the important one
2026-10-07 12:04:54 +02:00
Erik Fröjdh 9a55d5d79b Merge branch 'main' into dev/strixels/remap_simple
Build on RHEL9 / build (push) Successful in 3m0s
Build on RHEL8 / build (push) Successful in 3m51s
Run tests using data on local RHEL8 / build (push) Failing after 4m48s
2026-10-06 15:00:14 +02:00
Erik FröjdhandTomas Celko fdc2d9499f Dev/win ci (#410)
Build on RHEL9 / build (push) Successful in 2m58s
Build on RHEL8 / build (push) Successful in 3m41s
Run tests using data on local RHEL8 / build (push) Failing after 4m40s
Build on local RHEL8 / build (push) Successful in 3m25s
Added CI (wheels + native build for Windows)

closes #397

---------

Co-authored-by: Tomas Celko <tomas.celko@cvut.cz>
2026-10-06 14:49:25 +02:00
Erik Fröjdh cdd8586f64 Fixed warnings on Windows (#407)
Now builds clean on MSVC: cl version 19.51.36260 for x64, from Visual
Studio 2026 Build Tools 18.10.3.

Major items:

- [[maybe_unused]] instead of gcc/clang specific pragmas
- Removed names variables that weren't used
- Cast + explicit uing64
2026-10-06 14:49:24 +02:00
Erik Fröjdh 7e1b8a765d Dev/win compile (#402)
Build on RHEL9 / build (push) Successful in 3m13s
Build on RHEL8 / build (push) Successful in 3m48s
Run tests using data on local RHEL8 / build (push) Failing after 4m38s
Build on local RHEL8 / build (push) Successful in 3m18s
Collection of fixes to make aare build on Windows. Requires the previous
PRs for compilation to succeed.

- Replaced `or` keyword with ||
- updated cmake file
- fix for 32 bit long in fseek

closes #395 
closes #396
2026-10-05 19:13:45 +02:00
Erik FröjdhandClaude Fable 5.1 060a0ec9e7 Make the logger timestamp portable (#401)
logger.hpp pulled in <sys/time.h> and used gettimeofday and localtime_r,
which do not exist on MSVC. Build the timestamp from std::chrono instead
and use localtime_s on MSVC. The output format is unchanged: <colour>-
HH:MM:SS.mmm LEVEL: message<reset>. The unused __SHORT_FORM_OF_FILE__
helper now also strips backslash separators. Add logger tests that pin
the timestamp and line format.

closes #394

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-05 19:13:44 +02:00
Erik Fröjdh 3e90eb2539 Convert paths to strings explicitly (#400)
On Windows std::filesystem::path holds wchar_t, so assigning a path
component to a std::string or passing path::c_str() to fopen does not
compile. Use path::string() at those sites, and drop a redundant path
round trip in NumpyFile.

closes #399
2026-10-05 19:13:44 +02:00
Erik FröjdhandClaude Fable 5.1 4ac941a003 Add aare::ssize_t alias for MSVC (#398)
- MSVC has no ssize_t, which made every translation unit fail on
Windows.
- Define aare::ssize_t in defs.hpp: the platform ssize_t on POSIX (so
nothing changes there) and std::ptrdiff_t on MSVC.
- Code inside the namespace picks it up unchanged; the few files that
use ssize_t outside the namespace get a using-declaration. FilePtr.hpp
now includes defs.hpp since it had no aare include.

Closing #393

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-05 19:13:43 +02:00
Khalil Ferjaoui aed952cd5e Python bindings for aare::xy (#403)
Build on RHEL9 / build (push) Successful in 3m9s
Build on RHEL8 / build (push) Successful in 3m52s
Run tests using data on local RHEL8 / build (push) Failing after 4m36s
Build on local RHEL8 / build (push) Successful in 3m17s
Added missing python bindings for aare::xy needed for RawFile::geometry
etc.

closes #345
2026-10-05 11:40:56 +02:00
Erik Fröjdh f2db33365e bindings for xy 2026-10-04 09:54:55 +02:00
Erik Frojdh 6f5e6b4702 bumped version
Build on RHEL9 / build (push) Successful in 2m56s
Build on RHEL8 / build (push) Successful in 3m36s
Run tests using data on local RHEL8 / build (push) Failing after 4m36s
Build on local RHEL8 / build (push) Successful in 3m21s
2026.9.30
2026-09-30 16:55:00 +02:00
9661aef013 Selectable minimizers: Fumili, Levenberg-Marquardt and VarPro for the fit models (#387)
Build on RHEL9 / build (push) Successful in 3m1s
Build on RHEL8 / build (push) Successful in 3m40s
Run tests using data on local RHEL8 / build (push) Failing after 4m43s
Build on local RHEL8 / build (push) Successful in 3m22s
## Summary

Makes the minimizer behind `FitModel` selectable and adds two built-in,
dependency-free solvers next to Minuit2's Migrad and Fumili.
`Minimizer.Migrad` stays the default, so existing fits behave as before.

- **`Minimizer` enum** (C++ `FitModel::SetMinimizer`, Python `minimizer`
constructor argument and property): `Migrad`, `Fumili`,
`LevenbergMarquardt`, `VarPro`.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Khalil Ferjaoui <khalilferjaoui@yahoo.fr>
2026-09-30 16:50:27 +02:00
Erik Fröjdh 2efdd17d81 check ready before updating pd (#391)
Build on RHEL9 / build (push) Successful in 2m49s
Build on RHEL8 / build (push) Successful in 3m29s
Run tests using data on local RHEL8 / build (push) Failing after 4m37s
Build on local RHEL8 / build (push) Successful in 3m16s
- For set_nSigma only call update_pedestal if we have accumulated enough
samples otherwise just write it
- For update threshold check if pd is ready and if not throw

closes #390
2026-09-30 14:54:59 +02:00
Erik Fröjdh 941325ea15 More uniform binding of Numpy arrays (#381)
Build on RHEL9 / build (push) Successful in 2m54s
Build on RHEL8 / build (push) Successful in 3m31s
Run tests using data on local RHEL8 / build (push) Failing after 4m28s
Build on local RHEL8 / build (push) Successful in 3m6s
- Introduce a standard way to bind numpy arrays: py::array_t<T> and
.noconvert() on the argument
- Take py::array_t by value since it's just a small wrapper
- Update bindings
2026-09-25 14:40:33 +02:00
Erik Fröjdh 8579a140f7 Improved ArrayExpr (#378)
Build on RHEL9 / build (push) Successful in 3m9s
Build on RHEL8 / build (push) Successful in 3m34s
Run tests using data on local RHEL8 / build (push) Successful in 4m25s
Build on local RHEL8 / build (push) Successful in 3m5s
- removes code repetition
- avoid temporaries for scalar operations
2026-09-25 10:43:58 +02:00
Khalil Ferjaoui 4677e1003e Updated licensing info (#384)
Build on RHEL9 / build (push) Successful in 2m54s
Build on RHEL8 / build (push) Successful in 3m31s
Run tests using data on local RHEL8 / build (push) Successful in 4m24s
Build on local RHEL8 / build (push) Successful in 3m8s
- MIT correctly stated for NumpyHelpers
- added missing SPDX identifiers
- pinned sources for licensing
2026-09-24 15:52:37 +02:00
Erik Frojdh 24f1a6138a now correct
Build on RHEL9 / build (push) Successful in 2m58s
Build on RHEL8 / build (push) Successful in 3m36s
Run tests using data on local RHEL8 / build (push) Successful in 4m28s
2026-09-24 15:24:30 +02:00
Erik Frojdh 691735d89b added missing alias for Minuit standalone 2026-09-24 15:23:07 +02:00
Erik Frojdh 516b922b38 updated licensing info 2026-09-24 09:09:37 +02:00
Khalil Ferjaoui fb4a78b380 Removed move for SPSC queue and fixed license (#383)
Build on RHEL9 / build (push) Successful in 2m52s
Build on RHEL8 / build (push) Successful in 3m29s
Run tests using data on local RHEL8 / build (push) Successful in 4m34s
Build on local RHEL8 / build (push) Successful in 3m6s
- Removed faulty move (pointed out by: #227)
- Fixed license for the queue
- Runtime check for capacity=>2

Thank you @kferjaoui for finding the issue. In the end I found it better
to remove the operators rather than modifying the queue
2026-09-23 17:53:34 +02:00
Erik Frojdh abacfd5fda removed move for SPSC queue and fixed license 2026-09-23 16:58:48 +02:00
Erik Fröjdh 1398a74877 updated AGENTS.md and added CLAUDE.md (#380)
Build on RHEL9 / build (push) Successful in 2m48s
Build on RHEL8 / build (push) Successful in 3m25s
Run tests using data on local RHEL8 / build (push) Successful in 4m25s
Build on local RHEL8 / build (push) Successful in 3m7s
- Updated AGENTS.md 
- Added CLAUDE.md which tells claude to read AGENTS.md
2026-09-22 16:48:36 +02:00
Erik Fröjdh 752ec38596 added template for making views (#377)
Build on RHEL9 / build (push) Successful in 3m4s
Build on RHEL8 / build (push) Successful in 3m32s
Run tests using data on local RHEL8 / build (push) Successful in 4m25s
Build on local RHEL8 / build (push) Successful in 3m8s
Cleaned up the helper functions by: 
- Added template for make_view (and new make_const_view) instead of the
copy paste implementation
- checks c_style and dimensions inside make_view
- test binding to be able to probe the checks in make_view

Call sites can be reviewed in a second PR since usage of const or
strictness of conversion depends...
2026-09-22 09:25:42 +02:00
Erik Frojdh cbc4864e93 changed to size_t
Build on RHEL9 / build (push) Successful in 2m53s
Build on RHEL8 / build (push) Successful in 3m28s
Run tests using data on local RHEL8 / build (push) Successful in 4m29s
Build on local RHEL8 / build (push) Successful in 3m5s
2026-09-21 10:51:43 +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 97ddf6e7c1 error when compiling with warnings (#376)
Build on RHEL9 / build (push) Successful in 2m43s
Build on RHEL8 / build (push) Successful in 3m23s
Run tests using data on local RHEL8 / build (push) Successful in 4m31s
Build on local RHEL8 / build (push) Successful in 3m5s
- error upon warning when building documentation (warnings often
indicate malrendered documentation)
- fixed some warnings

Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
2026-09-17 09:27:05 +02:00
Erik Fröjdhandmazzol_a b558f1146b Fixed seek bug in CtbRawFile (#373)
Build on RHEL9 / build (push) Successful in 2m49s
Build on RHEL8 / build (push) Successful in 3m25s
Run tests using data on local RHEL8 / build (push) Successful in 4m27s
Build on local RHEL8 / build (push) Successful in 3m6s
- seek to the edge of a file + read_into would select the wrong file
- Visible for example in f.read_frame(index) in python

Added fix, release notes and a small test. 

closes #371

Co-authored-by: AliceMazzoleni99 <alice.mazzoleni@psi.ch>
2026-09-17 08:09:12 +02:00
mazzol_a ecaad914e7 updated documentation
Build on RHEL9 / build (push) Successful in 2m50s
Build on RHEL8 / build (push) Successful in 3m36s
Run tests using data on local RHEL8 / build (push) Successful in 4m43s
2026-09-16 15:46:26 +02:00
c880d6a252 Dev/python bindings for strixels (#364)
Build on RHEL9 / build (push) Successful in 2m50s
Build on RHEL8 / build (push) Successful in 3m40s
Run tests using data on local RHEL8 / build (push) Successful in 4m47s
- added release notes 
- added documentation for python 
- added python bindings

---------

Co-authored-by: vhinger <viktoria.hinger@psi.ch>
Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
2026-09-16 13:53:02 +02:00
hinger_v 2027c8371f Edit SensorConfig documentation for clarity
Build on RHEL9 / build (push) Successful in 2m45s
Build on RHEL8 / build (push) Successful in 3m24s
Run tests using data on local RHEL8 / build (push) Successful in 4m32s
2026-09-16 13:34:23 +02:00
mazzol_a e3b934c47a Merge branch 'main' into dev/strixels/remap_simple
Build on RHEL9 / build (push) Successful in 2m51s
Build on RHEL8 / build (push) Successful in 3m27s
Run tests using data on local RHEL8 / build (push) Successful in 4m29s
2026-09-16 12:22:51 +02:00
hinger_v 5bb810ce18 Eidit documentation
Build on RHEL9 / build (push) Successful in 2m37s
Build on RHEL8 / build (push) Successful in 3m12s
Run tests using data on local RHEL8 / build (push) Successful in 4m17s
2026-09-14 18:35:56 +02:00
Erik Fröjdh 8551281eb7 Cleaned up Pedestal (#370)
Build on RHEL9 / build (push) Successful in 2m52s
Build on RHEL8 / build (push) Successful in 3m33s
Run tests using data on local RHEL8 / build (push) Successful in 4m31s
Build on local RHEL8 / build (push) Successful in 3m4s
- renamed pedestal.hpp to bind_Pedestal.hpp for python bindings
- variance is now always calculated in double and made private
- cost correctness in a few places
- removed push_fast and explicit updates of mean from Pedestal. If
performance is needed use FastPedestal
- Pedestal no longer caches std
2026-09-14 16:27:53 +02:00
Erik Fröjdh b0875106e3 Improved ClusterFile API (#358)
Build on RHEL9 / build (push) Successful in 2m49s
Build on RHEL8 / build (push) Successful in 3m23s
Run tests using data on local RHEL8 / build (push) Successful in 4m23s
Build on local RHEL8 / build (push) Successful in 3m5s
Improved API for ClusterFile

- read_frame now returns a std::optional<ClusterVector> to differentiate
between an empty frame and end of file
- f.frames() produces an iterator over frames
- f.chunks() produces an iterator reading chunks of clusters
2026-09-14 16:01:25 +02:00
mazzol_a 09bf1c3b36 Merge branch 'main' into dev/strixels/remap_simple
Build on RHEL9 / build (push) Successful in 2m54s
Build on RHEL8 / build (push) Successful in 3m22s
Run tests using data on local RHEL8 / build (push) Successful in 4m20s
2026-09-10 16:59:18 +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
hinger_v 5a51dc822e Merge branch 'main' into dev/strixels/remap_simple
Build on RHEL9 / build (push) Successful in 2m32s
Build on RHEL8 / build (push) Successful in 3m13s
Run tests using data on local RHEL8 / build (push) Failing after 4m15s
2026-09-09 19:30:10 +02:00
hinger_v 45a79cd21c Update docs 2026-09-09 19:29:41 +02:00
hinger_v f0986fd85e Update documentation
Build on RHEL9 / build (push) Successful in 2m32s
Build on RHEL8 / build (push) Successful in 3m12s
Run tests using data on local RHEL8 / build (push) Failing after 4m17s
2026-09-09 18:24:17 +02:00
hinger_v c435226bd8 Make all algorithm tests explicit hardcoded 2026-09-09 18:23:50 +02:00
Erik Fröjdh 3431bbe117 better error and update frames (#365)
Build on RHEL9 / build (push) Successful in 2m34s
Build on RHEL8 / build (push) Successful in 3m13s
Run tests using data on local RHEL8 / build (push) Failing after 4m14s
Build on local RHEL8 / build (push) Successful in 2m54s
- Updated error message to mention out of range and which file it
applies to
- If there are different number of frames in the subfiles, take the
minimum and print a warning

Closes: #363 
Closes: #362
2026-09-09 17:07:08 +02:00
mazzol_a afce91b358 Fix/clusterfinder test (#359)
Build on RHEL9 / build (push) Successful in 2m41s
Build on RHEL8 / build (push) Successful in 3m19s
Run tests using data on local RHEL8 / build (push) Successful in 4m21s
Build on local RHEL8 / build (push) Successful in 2m53s
- fixed test in ClusterFinderMT (use minimum one pedestal to accumulate
dummy pedestal)
- added minimum_pedestal_samples as additional constructor argument in
ClusterFinder and ClusterFinderMT
- bugfix: race conditions for empty queues in collect() - check directly
when needed
2026-09-09 16:38:54 +02:00