Commit Graph
20 Commits
Author SHA1 Message Date
Erik Fröjdh a4da73fed1 Merge branch 'main' into dev/build-time
Build on RHEL8 / build (push) Failing after 1m37s
Build on RHEL9 / build (push) Failing after 1m47s
Run tests using data on local RHEL8 / build (push) Failing after 2m33s
2026-10-26 14:41:23 +01:00
Erik Fröjdh 7abbf3cbb5 Read raw files with gap pixels (#426)
Build on RHEL9 / build (push) Successful in 3m29s
Build on RHEL8 / build (push) Successful in 4m6s
Run tests using data on local RHEL8 / build (push) Successful in 4m54s
Build on local RHEL8 / build (push) Successful in 3m22s
Third part of splitting up dev/gap. The multithreaded reader comes in
the next PR.

- `RawFile` takes an optional `GapPixels`. Frames are assembled with the
gaps inserted: fill the gap lines, scatter each module part through the
scratch buffer into its gapped position, and split the chip edge counts
if configured. `rows()`, `cols()`, `pixels_per_frame()` and
`bytes_per_frame()` include the gaps, for the full frame and for each
ROI. Only Jungfrau and Eiger are supported.
- Python `RawFile` accepts `gap_pixels` as a bool or a `GapPixels`,
exposes it as a property, and takes frame shapes from `rows()` and
`cols()`.
- The generic `File` is unchanged: it does not know the detector
geometry of `.npy` and `.dat` files, so gap pixels stay a `RawFile`
option. Use `RawFile`, or apply `insert_gap_pixels` to frames from
`File`.
- Tests: generalized raw file helper with arbitrary module layouts,
module layout assembly tests (these cover #421, which went in without
tests), synthetic gap tests, a split-counts oracle against
`insert_gap_pixels`, unsupported detector rejection, and data-backed
recorded-file and two-ROI cases.
- A raw file benchmark with no-gaps, fill-value and split-counts cases.
- Docs and release note.
2026-10-26 14:39:13 +01:00
Erik Fröjdh 48d7f7fb03 Merge branch 'main' into dev/build-time
Build on RHEL8 / build (push) Successful in 3m14s
Build on RHEL9 / build (push) Successful in 3m30s
Run tests using data on local RHEL8 / build (push) Failing after 3m8s
2026-10-09 09:33: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 0a5b5f4d89 adding PCH for tests
Build on RHEL8 / build (push) Successful in 3m12s
Run tests using data on local RHEL8 / build (push) Failing after 3m26s
Build on RHEL9 / build (push) Successful in 3m32s
2026-10-07 08:30:16 +02:00
Erik Fröjdh 085960b816 Compile Catch2 as a unity build
Build on RHEL8 / build (push) Successful in 3m12s
Run tests using data on local RHEL8 / build (push) Failing after 3m14s
Build on RHEL9 / build (push) Successful in 3m32s
Catch2 v3 is ~100 small translation units that together took 58.5 s of
summed compile time in a Release build, more than aare_core itself.
Batched into unity sources of 16 files they take 13 s in 10 steps. The
test executable itself is unchanged.

Clean Release build with tests and bindings: 28 s -> 23 s on 10 cores;
all 277 test cases pass, both through run_tests and ctest.
2026-10-06 22:10:50 +02:00
Erik Frojdh 516b922b38 updated licensing info 2026-09-24 09:09:37 +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
lunin_l 8f8173feb6 CI/CD: Integrate pre-commit hooks and GitHub Actions workflow (#303)
Build on RHEL8 / build (push) Successful in 2m48s
Build on RHEL9 / build (push) Successful in 3m8s
Run tests using data on local RHEL8 / build (push) Successful in 3m34s
Build on local RHEL8 / build (push) Successful in 2m24s
To improve codebase quality and reduce human error, this PR introduces
the pre-commit framework. This ensures that all code adheres to project
standards before it is even committed, maintaining a consistent style
and catching common mistakes early.

Key Changes:

- Code Formatting: Automated C++ formatting using clang-format (based on
the project's .clang-format file).
- Syntax Validation: Basic checks for file integrity and syntax.
- Spell Check: Automated scanning for typos in source code and comments.
- CMake Formatting: Standardization of CMakeLists.txt and .cmake
configuration files.
- GitHub Workflow: Added a CI action that validates every Pull Request
against the pre-commit configuration to ensure compliance.

The configuration includes a [ci] block to handle automated fixes within
the PR. Currently, this is disabled. If we want the CI to automatically
commit formatting fixes back to the PR branch, this can be toggled to
true in .pre-commit-config.yaml.

```yaml
ci:
  autofix_commit_msg: [pre-commit] auto fixes from pre-commit hooks
  autofix_prs: false
  autoupdate_schedule: monthly
```

The last large commit with the fit functions, for example, was not
formatted according to the clang-format rules. This PR would allow to
avoid similar mistakes in the future.

Python fomat with `ruff` for tests and sanitiser for `.ipynb` notebooks
can be added as well.
2026-04-14 11:52:23 +02:00
Erik Fröjdh 200ae91622 also hpp 2025-11-21 10:14:14 +01:00
Erik Fröjdh 53aed8d8c6 added license 2025-11-20 09:01:28 +01:00
mazzol_a c6990dabad deleted unused variables 2025-06-23 17:27:13 +02:00
mazzol_a 75f63607fc friend_test macro 2025-06-12 17:46:10 +02:00
mazzol_a f9751902a2 formatted main branch 2025-06-10 16:09:06 +02:00
e1533282f1 Cluster cuts (#146)
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Failing after 43s
Co-authored-by: Patrick <patrick.sieberer@psi.ch>
Co-authored-by: JulianHeymes <julian.heymes@psi.ch>
Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
Co-authored-by: Xiangyu Xie <45243914+xiangyuxie@users.noreply.github.com>
Co-authored-by: xiangyu.xie <xiangyu.xie@psi.ch>
2025-04-01 15:15:54 +02:00
froejdh_e a0f481c0ee mod pedestal 2024-12-12 14:34:10 +01:00
Erik Fröjdh e77b615293 Added expression templates (#98)
- Works with NDArray
- Works with NDView
2024-11-15 15:17:52 +01:00
Erik Fröjdh b37f4845cf cmake defaults 2024-10-30 08:58:42 +01:00
Erik Fröjdh 5d643dc133 added cluster finder 2024-10-25 16:18:36 +02:00
Erik Fröjdh b1b020ad60 WIP 2024-10-25 10:23:34 +02:00