Commit Graph
161 Commits
Author SHA1 Message Date
mazzol_a d3d9f760b3 updated parse_json to parse new master json file 2025-10-01 20:17:37 +02:00
mazzol_a 474c35cc6b Merge branch 'main' into dev/reduce
Build on RHEL8 / build (push) Successful in 3m16s
Build on RHEL9 / build (push) Successful in 3m35s
2025-09-08 15:39:27 +02:00
mazzol_a 12114e7275 added documentation
Build on RHEL8 / build (push) Successful in 3m10s
Build on RHEL9 / build (push) Successful in 3m12s
2025-09-01 15:29:58 +02:00
mazzol_a 7926993bb2 reduction tests for python 2025-09-01 14:15:08 +02:00
mazzol_a 8733a1d66f added benchmark
Build on RHEL8 / build (push) Successful in 3m5s
Build on RHEL9 / build (push) Successful in 3m13s
2025-08-22 15:14:05 +02:00
mazzol_a b59277c4bf 3x3 reduction for general cluszter sizes
Build on RHEL8 / build (push) Successful in 3m8s
Build on RHEL9 / build (push) Successful in 3m9s
2025-08-19 12:37:55 +02:00
mazzol_a cb163c79b4 reduction to 2x2 clusters for general clusters 2025-08-18 18:23:15 +02:00
f54e76e6bf view is only allowed on l-value frame (#220)
Vadym accidentally called view() directly on an R-value frame, which
leads to a dangling view pointer.
Adjusted code such that compiler throws an error if called on an R-value
frame.

Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
2025-08-18 11:02:05 +02:00
c6da36d10b Fixed the order of cluster.data being incorrect (#221)
Build on RHEL8 / build (push) Successful in 3m4s
Build on RHEL9 / build (push) Successful in 3m11s
While using the cluster finder and saving a cluster, pixels which are
out of bounds are skipped. cluster.data should contain the pedestal
corrected ADU information of each pixel.

However, the counter "i" which keeps track of the position of
cluster.data is only incremented if the pixel was inside the bounds of
the frame.

This means that any clusters close to the frame's edges are not
construed properly. This means that if you want to extract a 3x3 from a
9x9 cluster, it can fail if the cluster data is not properly centered in
the pixel.

Fixed by moving i++ outside the bounds check.

Co-authored-by: Jonathan Mulvey <jonathan.mulvey@psi.ch>
2025-08-14 09:27:02 +02:00
froejdh_e 89bb8776ea check Ndim on drop_first_dim 2025-07-25 11:44:27 +02:00
froejdh_e 3d6858ad33 removed data_ref 2025-07-25 10:42:47 +02:00
froejdh_e d6222027d0 move constructor for Ndim-1 2025-07-25 10:40:32 +02:00
mazzol_a 1347158235 templated calculate_pedestal with boolean template argument only_gain0, added drop_dimension to NDArray and reference pointer to data 2025-07-24 15:40:05 +02:00
froejdh_e b8e91d0282 zero out switching pixels if 2D calibration is used 2025-07-24 12:10:13 +02:00
froejdh_e 46876bfa73 reduced duplicate code 2025-07-24 10:57:02 +02:00
froejdh_e 348fd0f937 removed unused code 2025-07-24 10:14:29 +02:00
froejdh_e 0fea0f5b0e added safe_divide to NDArray and used it for pedestal 2025-07-24 09:40:38 +02:00
froejdh_e 9a7713e98a added g0 calibration, pedestal and pixel counting 2025-07-22 16:42:09 +02:00
Erik FröjdhandGitHub 9a3694b980 Merge branch 'main' into dev/reduce
Build on RHEL9 / build (push) Successful in 3m10s
Build on RHEL8 / build (push) Successful in 3m11s
2025-07-18 10:19:42 +02:00
Erik FröjdhandGitHub abae2674a9 Apply calibration to Jungfrau raw data (#216)
- Added function to read calibration file
- Multi threaded pedestal subtraction and application of the calibration
2025-07-18 10:19:14 +02:00
Erik FröjdhandGitHub 83717571c8 Merge branch 'main' into dev/reduce 2025-06-27 17:10:24 +02:00
Erik FröjdhandGitHub 97dae4ac60 added empty() to ClusterVector and fixed docs (#209)
- added ClusterVector::empty() to check if the vector is empty
- Fixed generation of missing docs for ClusterVector
2025-06-27 17:00:46 +02:00
froejdh_e 5a9c3b717e naive implementation of 3x3 and 5x5 reduction 2025-06-27 16:36:21 +02:00
Erik FröjdhandGitHub e3f4b34b72 Const element access and fixed comparing bug (#208)
- Added const element access
- Added const data*
- Fixed bug comparing two Views of same size but different shapes

closes #207
2025-06-27 14:13:51 +02:00
mazzol_a 318e640639 only test over the public interface 2025-06-23 17:27:13 +02:00
mazzol_a c6990dabad deleted unused variables 2025-06-23 17:27:13 +02:00
mazzol_a 9f8eee5d08 fixed python bindings - only read headers of modules that are in the roi
Build on RHEL8 / build (push) Successful in 2m51s
Build on RHEL9 / build (push) Successful in 2m53s
2025-06-16 11:07:00 +02:00
mazzol_a b13f864b2b need n_modules 2025-06-13 17:01:13 +02:00
mazzol_a 0f56846e3d deleted some commented lines 2025-06-13 16:33:25 +02:00
mazzol_a be67bbab6b extended DetectorGeometry class with find_geometry, update_geometry (refactoring) 2025-06-13 16:16:23 +02:00
mazzol_a bd7870e75a review comments
Build on RHEL9 / build (push) Successful in 2m53s
Build on RHEL8 / build (push) Successful in 2m55s
2025-06-12 18:14:48 +02:00
mazzol_a 75f63607fc friend_test macro 2025-06-12 17:46:10 +02:00
mazzol_a 19ecc82fff solved merge conflict
Build on RHEL8 / build (push) Successful in 2m52s
Build on RHEL9 / build (push) Successful in 3m12s
2025-06-10 17:01:40 +02:00
mazzol_a f9751902a2 formatted main branch 2025-06-10 16:09:06 +02:00
mazzol_a 923f7d22b8 Merge branch 'main' into dev/fix/rawfilereader_with_roi 2025-06-10 15:59:52 +02:00
mazzol_a ad7525cd02 considered num_udp_interafces for jungfrau and quad structure for eiger 2025-06-10 11:35:15 +02:00
mazzol_a 87d8682b1e added test cases 2025-06-06 11:31:39 +02:00
Erik FröjdhandGitHub 1bc2fd770a Binding 5x5, 7x7 and 9x9 clusters in python (#188)
Build on RHEL8 / build (push) Successful in 2m55s
Build on RHEL9 / build (push) Successful in 2m58s
- New binding code with macros to bind all cluster templates
- Simplified factory function on the python side
- 5x5, 7x7 and 9x9 bindings in python
2025-06-05 08:57:59 +02:00
mazzol_a 9c6e629298 only files within the ROI are opened & geometry always read in RawMasterFile 2025-06-04 16:34:40 +02:00
Erik FröjdhandGitHub 9e1b8731b0 RawSubFile support multi file access (#173)
This PR is a fix/improvement to a problem that Jonathan had. (#156) The
original implementation opened all subfiles at once witch works for
normal sized datasets but fails at a certain point (thousands of files).

- This solution uses RawSubFile to manage the different file indicies
and only opens the file we need
- Added logger.h from slsDetectorPackage for debug printing (in
production no messages should be visible)
2025-05-22 11:00:03 +02:00
Erik FröjdhandGitHub a6eebbe9bd removed extra const on return type, added cast (#177)
Build on RHEL9 / build (push) Successful in 2m31s
Build on RHEL8 / build (push) Successful in 2m34s
Fixed warnings on apple clang:

- removed extra const on return type
- added cast to suppress a float to double conversion warning
2025-05-20 15:27:38 +02:00
cf158e2dcd Added scurve fitting (#168)
Build on RHEL9 / build (push) Successful in 2m21s
Build on RHEL8 / build (push) Failing after 2m26s
- added scurve fitting with two different signs (scurve, scurve2)
- at the moment no option to set initial parameters

---------

Co-authored-by: JulianHeymes <julian.heymes@psi.ch>
2025-05-05 11:40:04 +02:00
Erik FröjdhandGitHub 12ae1424fb consistent use of ssize_t instead of int64_t (#167)
Build on RHEL9 / build (push) Successful in 2m10s
Build on RHEL8 / build (push) Failing after 2m33s
- Consistent use of ssize_t to avoid issues on 32 bit platforms and also
mac with (long long int as ssize_t)
2025-04-25 15:52:02 +02:00
mazzol_a eb6862ff99 changed name of GainMap to InvertedGainMap
Build on RHEL9 / build (push) Successful in 2m16s
Build on RHEL8 / build (push) Failing after 2m34s
2025-04-25 12:03:59 +02:00
mazzol_a f06e722dce changes from PR review 2025-04-25 11:38:56 +02:00
Erik FröjdhandGitHub 7b5e32a824 Api extra (#166)
Changes to be able to run the example notebooks: 

- Invert gain map on setting (multiplication is faster but user supplies
ADU/energy)
- Cast after applying gain map not to loose precision (Important for
int32 clusters)
- "factor" for ClusterFileSink 
- Cluster size available to be able to create the right file sink
2025-04-25 10:31:16 +02:00
froejdh_e 86d343f5f5 merged with developer
Build on RHEL9 / build (push) Successful in 2m9s
Build on RHEL8 / build (push) Failing after 2m32s
2025-04-23 11:45:04 +02:00
froejdh_e c6e8e5f6a1 inverted gain map 2025-04-22 16:16:27 +02:00
326941e2b4 Custom base for decoding ADC data (#163)
New function apply_custom_weights (can we find a better name) that takes
a uint16 and a NDView<double,1> of bases for the conversion. For each
supplied weight it is used as base (instead of 2) to convert from bits
to a double.

---------

Co-authored-by: siebsi <sieb.patr@gmail.com>
2025-04-22 15:20:46 +02:00
mazzol_a 177459c98a added multithreaded cluster finder test
Build on RHEL9 / buildh (push) Successful in 2m20s
2025-04-17 17:09:53 +02:00