Commit Graph
533 Commits
Author SHA1 Message Date
hinger_v 857059cdaf Fix duplicate include
Build on RHEL8 / build (push) Failing after 1m40s
Build on RHEL9 / build (push) Failing after 2m8s
Run tests using data on local RHEL8 / build (push) Failing after 2m32s
2026-07-21 15:46:09 +02:00
hinger_v 81b91fb959 Refactoring suggestion for mapping result (reduced + doc) 2026-07-21 15:45:39 +02:00
hinger_v 9a63c9ac94 Refactoring suggestion for remap result (correct comments)
Build on RHEL8 / build (push) Failing after 1m28s
Build on RHEL9 / build (push) Failing after 1m38s
Run tests using data on local RHEL8 / build (push) Failing after 2m5s
2026-07-21 15:22:25 +02:00
hinger_v f09ede2646 Refactoring suggestion for mapping result 2026-07-21 15:00:36 +02:00
hinger_v 9344cea819 Improve documentation of structs in defs and rename SensorPlacement -> SensorModulePlacement
Build on RHEL9 / build (push) Successful in 2m34s
Build on RHEL8 / build (push) Successful in 3m6s
Run tests using data on local RHEL8 / build (push) Successful in 4m1s
2026-07-17 15:51:16 +02:00
hinger_v 9bc4a4d6a9 Delete legacy configs
Build on RHEL9 / build (push) Successful in 2m33s
Build on RHEL8 / build (push) Successful in 3m8s
Run tests using data on local RHEL8 / build (push) Successful in 3m53s
2026-07-17 14:23:21 +02:00
hinger_v 4b8317de69 Missed file from previous commit (move SensorPixelGeometry and rename structs in defs) 2026-07-17 14:17:48 +02:00
hinger_v 6b0598cd30 Move SensorPixelGeometry to SensorConfig and rename group-specific entities to reflect independence of sensor 2026-07-17 14:16:50 +02:00
hinger_v 67690aacf9 Fix only one SensorPlacement also in RemapGenerate.hpp 2026-07-17 11:36:23 +02:00
hinger_v d3e337d061 Fix compiler warning -> ssize_t
Build on RHEL9 / build (push) Successful in 2m34s
Build on RHEL8 / build (push) Successful in 3m32s
Run tests using data on local RHEL8 / build (push) Successful in 4m6s
2026-07-16 19:39:24 +02:00
hinger_v 1b05488173 Separate flat_index < 0 from >= input.size() and throw only at the latter 2026-07-16 19:30:02 +02:00
hinger_v 14bfc19b6a Rework RemapAlgorithm.hpp according to comments
Build on RHEL9 / build (push) Successful in 2m36s
Build on RHEL8 / build (push) Successful in 3m9s
Run tests using data on local RHEL8 / build (push) Successful in 3m53s
- Add assert to flip
- Only one SensorPlacement for strixel_to_pixel_maps
- Pass order_map as NDView to ApplyRemap

Additional:
- Check output.shape() matches order_map.shape (correct buffer allocation)
- Chash nrows and ncols
- pass NDViews by value (copying is cheap and it makes the intent more clear that it only takes a snapshot of the arrays
2026-07-16 19:21:09 +02:00
hinger_v 60c4d77627 Rename: alignROIs -> rebaseROI 2026-07-16 12:22:26 +02:00
hinger_v a6927310a5 SImplify and document according to comments
Build on RHEL8 / build (push) Failing after 1m30s
Build on RHEL9 / build (push) Failing after 1m34s
Run tests using data on local RHEL8 / build (push) Failing after 2m10s
2026-07-16 12:15:01 +02:00
hinger_v 98385902df Merge branch 'main' into dev/strixels/remap_simple 2026-07-16 11:05:30 +02:00
hinger_v afd92ac457 Bugfix: Separate Rotation and Routing 2026-07-16 11:04:43 +02:00
mazzol_a 533ecb8a4a removed patch for minuit2 CMakeLists.txt (#336)
Build on RHEL9 / build (push) Successful in 2m57s
Build on RHEL8 / build (push) Successful in 3m35s
Run tests using data on local RHEL8 / build (push) Successful in 3m57s
Build on local RHEL8 / build (push) Successful in 2m46s
- patch no longer needed for minuit2 as CMakeLists.txt has been updated:
https://github.com/GooFit/Minuit2/commit/46716e516e34a95e1f4effa95705a9e0c3425839
2026-07-16 10:39:06 +02:00
Erik Fröjdh db67e870d9 readme
Build on RHEL9 / build (push) Successful in 2m42s
Build on RHEL8 / build (push) Successful in 3m15s
Run tests using data on local RHEL8 / build (push) Successful in 3m58s
Build on local RHEL8 / build (push) Successful in 2m46s
2026.7.2
2026-07-02 17:00:45 +02:00
Erik Fröjdh 7804e3a35b bumped version 2026-07-02 16:51:44 +02:00
4aadb6f7f0 refactor: hide Minuit2 from aare's public API (#331)
Build on RHEL9 / build (push) Successful in 3m13s
Build on RHEL8 / build (push) Successful in 3m52s
Run tests using data on local RHEL8 / build (push) Successful in 3m56s
Build on local RHEL8 / build (push) Successful in 2m45s
- Move Chi2.hpp from include/aare/ to src/ (private)
- Pimpl on FitModel<Model>: MnUserParameters/MnStrategy behind opaque
src/FitModelImpl.hpp, no Minuit2 includes in public headers
- Move fit_pixel/fit_3d bodies to Fit.cpp with explicit instantiations
for all 8 models; drop FCN template param from public API
- CMake: aare::Minuit2 wrapped in $<BUILD_INTERFACE:...> (hidden from
exported targets, same pattern as lmfit), MINUIT2_INSTALL OFF, Chi2.hpp
removed from PUBLICHEADERS
- Update python bindings and benchmark callsites accordingly

---------

Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
Co-authored-by: Alice <alice.mazzoleni@psi.ch>
2026-07-02 16:04:22 +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
maliakal_d 8c9f4ca763 cmake: treat warnings as errors (#330)
Build on RHEL9 / build (push) Successful in 2m33s
Build on RHEL8 / build (push) Successful in 3m13s
Run tests using data on local RHEL8 / build (push) Successful in 3m59s
Build on local RHEL8 / build (push) Successful in 2m44s
- treating warnings as errors during github and gitea workflows
2026-06-16 12:32:28 +02:00
mazzol_a 982419149d Merge branch 'main' into dev/treat_errors_as_warnings
Build on RHEL9 / build (push) Successful in 2m50s
Build on RHEL8 / build (push) Successful in 3m30s
Run tests using data on local RHEL8 / build (push) Successful in 3m53s
2026-06-15 14:44:13 +02:00
mazzol_a 0a4c4f5ec1 change AxisType to float for pixelhistogram tests 2026-06-15 14:27:26 +02:00
mazzol_a 559c822a02 change AxisType to float for pixelhistogram tests
Build on RHEL9 / build (push) Successful in 2m29s
Build on RHEL8 / build (push) Successful in 3m40s
Run tests using data on local RHEL8 / build (push) Successful in 3m58s
2026-06-15 14:22:24 +02:00
mazzol_a b71fcb1d1a fixed apple clang warning 2026-06-15 14:03:36 +02:00
mazzol_a 85833cebb3 fixed unsued warning in PedestalTrackingHistogram 2026-06-15 11:52:44 +02:00
Erik Fröjdh b4b28fc9e0 len() and pedestal subtraction (#328)
Build on RHEL9 / build (push) Successful in 2m57s
Build on RHEL8 / build (push) Successful in 3m28s
Run tests using data on local RHEL8 / build (push) Successful in 4m0s
Build on local RHEL8 / build (push) Successful in 2m44s
Collection of small improvements in usability: 

- NDView works for large arrays
- Direct subtraction of Pedestal from np.array
- len() support for python bindings of files
2026-06-15 11:38:06 +02:00
mazzol_a ae8744358a cmake format 2026-06-15 11:36:03 +02:00
mazzol_aandErik Fröjdh ee7503082d Dev/matterhorn decoder (#324)
Build on RHEL9 / build (push) Successful in 2m49s
Build on RHEL8 / build (push) Successful in 3m35s
Run tests using data on local RHEL8 / build (push) Successful in 4m1s
Build on local RHEL8 / build (push) Successful in 3m9s
- reshape image directly in decoder such that first dimension is num
counters
- take into account chip artefact in decoder.

---------

Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
2026-06-11 15:04:20 +02:00
Erik Fröjdh 2041c7310a Fixed usage of fmt::format and fmt::print for C++20 (#323)
Build on RHEL8 / build (push) Successful in 3m5s
Build on RHEL9 / build (push) Successful in 3m4s
Run tests using data on local RHEL8 / build (push) Successful in 3m57s
Build on local RHEL8 / build (push) Successful in 2m41s
With C++20 `fmt::print(s)` expects a compile time format string and
otherwise fails complaining about consteval. To get runtime formatting
use `fmt::print(fmt::runtime(s))`
2026-06-11 08:01:03 +02:00
hinger_v e70392aafe Merge branch 'main' into dev/strixels/remap_simple
Build on RHEL9 / build (push) Successful in 2m51s
Build on RHEL8 / build (push) Successful in 3m13s
Run tests using data on local RHEL8 / build (push) Successful in 4m2s
2026-06-10 13:33:46 +02:00
Erik Fröjdh 17d04083a7 Bugfix: NDArary/NDView overflow in calculating number of elements (#322)
Build on RHEL9 / build (push) Successful in 2m38s
Build on RHEL8 / build (push) Successful in 3m10s
Run tests using data on local RHEL8 / build (push) Successful in 3m59s
Build on local RHEL8 / build (push) Successful in 2m45s
Fixed number of elements calculation that caused integer overflow. Now
return size_t instead of int.
2026-06-10 12:24:18 +02:00
Erik Fröjdh b78ea64ea7 Conditional use of Minuit2 (#320)
Build on RHEL9 / build (push) Successful in 2m31s
Build on RHEL8 / build (push) Successful in 3m9s
Run tests using data on local RHEL8 / build (push) Successful in 3m56s
Build on local RHEL8 / build (push) Successful in 2m44s
If AARE_FETCH_MINUIT is set to OFF we first look for a standalone
Minuit2 and if that is not found we try to find Minuit2 as a part of
ROOT.

In both cases we make an alias to allow for simpler use of the target
later.

It still doesn't solve the issue that we install Minuit to when we fetch
it but that can be addressed in a separate PR.

closes #316
2026-06-10 08:30:03 +02:00
Erik FröjdhandLars Erik Fröjd f670ba77a2 PixelHistogram (#317)
Build on RHEL9 / build (push) Successful in 2m31s
Build on RHEL8 / build (push) Successful in 3m6s
Run tests using data on local RHEL8 / build (push) Successful in 3m55s
Build on local RHEL8 / build (push) Successful in 2m42s
Multi threaded filling of per pixel histograms for example for detector calibration

1. PixelHistogram - Generic variant expects already pedestal subtracted
data
2. PedestalTrackingHistogram - Terrible name, useful class. Keeps it's
own pedestal and does conversion and pedestal tracking in the worker
threads.

---------

Co-authored-by: Lars Erik Fröjd <froejdh_e@pc-jungfrau-02.psi.ch>
2026-06-09 09:08:48 +02:00
hinger_v 414d2689c1 Fix comment
Build on RHEL9 / build (push) Successful in 2m26s
Build on RHEL8 / build (push) Successful in 3m2s
Run tests using data on local RHEL8 / build (push) Successful in 3m52s
2026-06-04 19:25:42 +02:00
hinger_v d87e834963 Merge branch 'main' into dev/strixels/remap_simple 2026-06-04 16:40:09 +02:00
hinger_v d7dd3a07ef Clarify layout with comments and printouts
Build on RHEL9 / build (push) Successful in 2m36s
Build on RHEL8 / build (push) Successful in 3m8s
Run tests using data on local RHEL8 / build (push) Successful in 3m55s
2026-06-04 16:39:14 +02:00
maliakal_d 8e69b498e5 Fix version (#319)
Build on RHEL9 / build (push) Successful in 2m34s
Build on RHEL8 / build (push) Successful in 3m2s
Run tests using data on local RHEL8 / build (push) Successful in 3m45s
Build on local RHEL8 / build (push) Successful in 2m38s
- install VERSION file and copy to build
- fix lookup for VERSION file in case of error
- update documentation for installing python bindings
2026-06-03 12:10:58 +02:00
hinger_v 4b8d71a452 Add more generators
Build on RHEL9 / build (push) Successful in 2m37s
Build on RHEL8 / build (push) Successful in 3m2s
Run tests using data on local RHEL8 / build (push) Successful in 3m50s
2026-06-01 17:11:57 +02:00
lunin_landmazzol_a 282debcc94 Add __version__ variable for python library (#308)
Build on RHEL9 / build (push) Successful in 2m23s
Build on RHEL8 / build (push) Successful in 3m5s
Run tests using data on local RHEL8 / build (push) Successful in 3m56s
Build on local RHEL8 / build (push) Successful in 2m38s
[PEP 396](https://peps.python.org/pep-0396/)

---------

Co-authored-by: AliceMazzoleni99 <alice.mazzoleni@psi.ch>
2026-05-27 14:38:35 +02:00
hinger_v 47ebbd2267 Merge branch 'main' into dev/strixels/remap_simple 2026-05-22 18:12:05 +02:00
mazzol_a 41c47cb54b dont reinstall fmt (#314)
Build on RHEL9 / build (push) Successful in 2m24s
Build on RHEL8 / build (push) Successful in 2m58s
Run tests using data on local RHEL8 / build (push) Successful in 3m43s
Build on local RHEL8 / build (push) Successful in 2m37s
- dont reinstall fmt/nlohmann
2026-05-22 15:44:35 +02:00
mazzol_a 502c37a00a number of clusters is always uint32_t (#313)
Build on RHEL9 / build (push) Successful in 2m45s
Build on RHEL8 / build (push) Successful in 3m21s
Run tests using data on local RHEL8 / build (push) Successful in 3m55s
Build on local RHEL8 / build (push) Successful in 2m37s
2026-05-22 09:22:29 +02:00
Khalil Ferjaoui 52b5cf6b9f Feature/gauss+plateau (#312)
Build on RHEL9 / build (push) Successful in 2m27s
Build on RHEL8 / build (push) Successful in 3m1s
Run tests using data on local RHEL8 / build (push) Successful in 3m54s
Build on local RHEL8 / build (push) Successful in 2m36s
Adds three Minuit2-backed spectrum models to the Python-exposed fitting
API:

- `GaussianErfcPlateau`
- `GaussianChargeSharing`
- `GaussianChargeSharingKb`

Closes #297
2026-05-21 08:33:02 +02:00
Xiangyu Xieandxie_x1 de74f12640 Dev var cluster finder (#310)
Build on RHEL9 / build (push) Successful in 2m30s
Build on RHEL8 / build (push) Successful in 3m36s
Run tests using data on local RHEL8 / build (push) Successful in 3m51s
Build on local RHEL8 / build (push) Successful in 2m36s
Add options for var cluster_finder_X:
1. number of neighbors (for better segmentation of clusters)
2. option to empty the surrounding pixels

---------

Co-authored-by: xiangyu.xie <xiangyu.xie@psi.ch>
2026-05-18 16:16:09 +02:00
lunin_l 4e3b70140a CI/CD: add conda build installation (#309)
Build on RHEL8 / build (push) Successful in 2m59s
Build on RHEL9 / build (push) Successful in 2m56s
Run tests using data on local RHEL8 / build (push) Successful in 3m41s
Build on local RHEL8 / build (push) Successful in 2m37s
Build conda pkgs workflows
[failing](https://github.com/slsdetectorgroup/aare/actions/runs/25800676450/job/75789547058#step:5:10)
due to the missing `conda build` command.

This PR fixes the issue.
2026-05-13 16:32:02 +02:00
mazzol_a 2736d975c5 Dev/enable custom etas (#305)
Build on local RHEL8 / build (push) Successful in 2m32s
Build on RHEL9 / build (push) Successful in 2m29s
Build on RHEL8 / build (push) Successful in 2m52s
Run tests using data on local RHEL8 / build (push) Successful in 3m49s
- Allowing the users more flexibility to play around with custom eta
functions without touching the c++ code

- passing vector of eta values to ``transform_eta_values`` 

```
from aare import Interpolator, ClusterVector, Etai, Cluster
import numpy as np 

def custom_eta(cluster_pixel_coordinate_x, cluster_pixel_coordinate_y, cluster_data):
    # dummy custom eta function that just returns the sum of the cluster data
    eta = Etai()
    eta.x = 0.1 # dummy x value
    eta.y = 0.1 # dummy y value
    eta.sum = np.sum(cluster_data) # sum of the cluster data as the "energy
    return eta

# Create a dummy eta distribution and bins
eta_distribution = np.zeros((10, 10, 1)) # dummy eta distribution
etax_bins = np.linspace(0, 1.0, 11)
etay_bins = np.linspace(0, 1.0, 11)
e_bins = np.array([0., 10.]) # dummy energy bins

# Create the interpolator
interpolator = Interpolator(eta_distribution, etax_bins, etay_bins, e_bins)

# Create a dummy cluster vector
cluster_vector = ClusterVector()
cluster_vector.push_back(Cluster(10, 5, np.ones(shape=9, dtype = np.int32)))
cluster_vector.push_back(Cluster(20, 10, np.ones(shape=9, dtype = np.int32)))

# Create dummy etas for the clusters
cluster_array = np.array(cluster_vector)
etas = np.array([custom_eta(cluster["x"], cluster["y"], cluster["data"]) for cluster in cluster_array])

# transform eta values to uniform coordinates 
uniform_coordinates = interpolator.transform_eta_values(etas)

# Interpolate to get the photon coordinates e.g. apply interpolation logic 
photon_coordinates_x = cluster_array["x"] + uniform_coordinates["x"] # add to pixel coordinate 
photon_coordinates_y = cluster_array["y"] + uniform_coordinates["y"] # add to pixel coordinate 

```
advantage: full control over interpolation logic, 
downside: inefficient quite some loops in python
- passing pre computed eta values to interpolate function 
```
Interpolator.interpolate(cluster_vector, etas) 
```
downside: less flexibility in interpolation logic. 
downside: People might misuse it instead of using interpolate directly
with a pre compiled eta function implemented in c++
2026-04-24 14:01:13 +02:00
mazzol_aandErik Fröjdh 6ff664f812 allow passing mask to clustervector (#304)
Build on RHEL9 / build (push) Successful in 2m24s
Build on RHEL8 / build (push) Successful in 2m54s
Run tests using data on local RHEL8 / build (push) Successful in 3m52s
Build on local RHEL8 / build (push) Successful in 2m34s
- passing mask to ClusterVector 
- creates a copy of the ClusterVector

Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
2026-04-17 17:13:02 +02:00
Erik Fröjdh 4875c31513 bumped pybind version, cmake fixes (#300)
Build on RHEL9 / build (push) Successful in 2m25s
Build on RHEL8 / build (push) Successful in 2m57s
Run tests using data on local RHEL8 / build (push) Successful in 3m37s
Build on local RHEL8 / build (push) Successful in 2m33s
- Bumped pybind11 version
- Bumped libfmt version
- Patch  Minuit to avoid messing around with CMake policy
2026-04-17 15:50:49 +02:00