308 Commits

Author SHA1 Message Date
119ca96a52 added test
All checks were successful
Build on RHEL9 / build (push) Successful in 2m57s
Build on RHEL8 / build (push) Successful in 2m57s
2025-06-13 11:24:16 +02:00
053536d135 fixed adc mask and roi, also the test for hdf5 for jungfrua 2025-06-13 10:20:33 +02:00
286b2888ca wip, test fails at scanparameters
All checks were successful
Build on RHEL9 / build (push) Successful in 2m52s
Build on RHEL8 / build (push) Successful in 2m55s
2025-06-12 17:40:45 +02:00
52aa1d4d9b added some tostring tests from package 2025-06-12 17:02:30 +02:00
8556ab6564 minor changes in includes 2025-06-12 16:33:08 +02:00
51a87e2a1e scan parameters into a separate test
All checks were successful
Build on RHEL9 / build (push) Successful in 2m55s
Build on RHEL8 / build (push) Successful in 2m57s
2025-06-12 14:30:38 +02:00
e6dd1f3ec2 restructured to have a separate file and test for to_string, string_utils, scan_parameters 2025-06-12 13:57:53 +02:00
65672d06f3 removed hdf5 componenets. not needed
All checks were successful
Build on RHEL8 / build (push) Successful in 2m55s
Build on RHEL9 / build (push) Successful in 3m1s
2025-06-11 23:45:37 +02:00
bceefe6d64 merge fix from before
All checks were successful
Build on RHEL9 / build (push) Successful in 2m54s
Build on RHEL8 / build (push) Successful in 2m55s
2025-06-11 16:01:47 +02:00
cc57cc7c27 formatted my changes 2025-06-11 15:13:35 +02:00
d89530ed22 merge from formatted main 2025-06-11 15:11:47 +02:00
7917e6f81a works for multi jungfrau and m3 2025-06-11 15:01:12 +02:00
a26073fb41 added all the parameters
All checks were successful
Build on RHEL8 / build (push) Successful in 2m55s
Build on RHEL9 / build (push) Successful in 2m59s
2025-06-11 14:56:24 +02:00
3cc44f780f Added branching strategy etc. to docs (#191)
All checks were successful
Build on RHEL9 / build (push) Successful in 2m56s
Build on RHEL8 / build (push) Successful in 2m57s
Added a section on the ideas behind the library and also explaining the
branching strategy.

---------

Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
2025-06-11 13:21:21 +02:00
f3f3e2af6a map of strings 2025-06-11 12:04:56 +02:00
031d9503d8 fixed size_t for consistencies, done everything except array of ns and map
All checks were successful
Build on RHEL8 / build (push) Successful in 2m54s
Build on RHEL9 / build (push) Successful in 3m0s
2025-06-10 17:20:56 +02:00
2a069f3b6e formatted main branch (#195)
All checks were successful
Build on RHEL8 / build (push) Successful in 2m53s
Build on RHEL9 / build (push) Successful in 3m7s
2025-06-10 16:24:11 +02:00
f9751902a2 formatted main branch 2025-06-10 16:09:06 +02:00
cba2e46e2f threshold energy
All checks were successful
Build on RHEL9 / build (push) Successful in 2m54s
Build on RHEL8 / build (push) Successful in 2m55s
2025-06-10 11:02:13 +02:00
b4a9b4caec minor refactoring 2025-06-10 10:49:53 +02:00
be7f510775 fix for burst mode when not in file 2025-06-10 10:42:43 +02:00
56fa6f6bfb added counter mask, fixed adc mask data type, removed redundant scan parameter parsing 2025-06-10 09:25:20 +02:00
ca4d392b2f dbit offset and transceiver mask
All checks were successful
Build on RHEL8 / build (push) Successful in 2m52s
Build on RHEL9 / build (push) Successful in 2m58s
2025-06-09 16:03:55 +02:00
3b65e92cb7 added num interfaces and ten giga enable 2025-06-09 15:14:35 +02:00
755a8fb2b7 added exptime, period in hdf5, also added print for chrono and StringTo 2025-06-09 14:41:07 +02:00
dc7f6d44f2 fixed master h5
All checks were successful
Build on RHEL8 / build (push) Successful in 2m59s
Build on RHEL9 / build (push) Successful in 3m0s
2025-06-09 00:41:21 +02:00
480e28c927 wip at fixing hdf5 master file
Some checks failed
Build on RHEL9 / build (push) Failing after 1m27s
Build on RHEL8 / build (push) Failing after 1m36s
2025-06-06 16:36:40 +02:00
d7242671b2 Merge branch 'main' into dev/hdf5
All checks were successful
Build on RHEL8 / build (push) Successful in 2m58s
Build on RHEL9 / build (push) Successful in 3m1s
2025-06-05 16:18:05 +02:00
a6a02249bc refactoring, removing redundant functiosn to read header fields 2025-06-05 16:17:22 +02:00
efd2338f54 deploy docs on release only
All checks were successful
Build on RHEL8 / build (push) Successful in 2m56s
Build on RHEL9 / build (push) Successful in 2m57s
2025-06-05 14:55:00 +02:00
b97f1e24f9 merged developer 2025-06-05 14:42:37 +02:00
1bc2fd770a Binding 5x5, 7x7 and 9x9 clusters in python (#188)
All checks were successful
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
a3f831dc9e efficiently read in one hyperslab read instead of multiple reads in a loop
All checks were successful
Build on RHEL9 / build (push) Successful in 2m24s
Build on RHEL8 / build (push) Successful in 2m26s
2025-06-05 00:38:27 +02:00
76b8872fe6 refactored a bit 2025-06-05 00:11:24 +02:00
55236ce6cc todo minor
All checks were successful
Build on RHEL9 / build (push) Successful in 2m22s
Build on RHEL8 / build (push) Successful in 2m28s
2025-06-04 16:58:09 +02:00
e7d3e667b0 should work for other multiple frame reads 2025-06-04 16:54:18 +02:00
d9cbf0f481 able to get headers from multiple modules as well 2025-06-04 15:59:27 +02:00
5681e18403 merge from latest developer
All checks were successful
Build on RHEL9 / build (push) Successful in 2m21s
Build on RHEL8 / build (push) Successful in 2m40s
2025-06-03 11:24:37 +02:00
69964e08d5 Refactor cluster bindings (#185)
All checks were successful
Build on RHEL9 / build (push) Successful in 2m19s
Build on RHEL8 / build (push) Successful in 2m34s
- Split up the file for cluster bindings
- new file names according to bind_ClassName.hpp
2025-06-03 08:43:40 +02:00
94ac58b09e For 2025.5.22 release (#181)
All checks were successful
Build on RHEL9 / build (push) Successful in 2m22s
Build on RHEL8 / build (push) Successful in 2m29s
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>
Co-authored-by: AliceMazzoleni99 <alice.mazzoleni@psi.ch>
Co-authored-by: Mazzoleni Alice Francesca <mazzol_a@pc17378.psi.ch>
Co-authored-by: siebsi <sieb.patr@gmail.com>
2025-05-22 11:40:39 +02:00
9ecf4f4b44 merge
All checks were successful
Build on RHEL9 / build (push) Successful in 2m22s
Build on RHEL8 / build (push) Successful in 2m30s
2025-05-22 11:23:57 +02:00
f2a024644b bumped version upload on release 2025-05-22 11:10:23 +02:00
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
a6eebbe9bd removed extra const on return type, added cast (#177)
All checks were successful
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
81588fba3b linking to threads and removed extra ; (#176)
All checks were successful
Build on RHEL9 / build (push) Successful in 2m14s
Build on RHEL8 / build (push) Successful in 2m32s
- Fixing broken build of tests on RH8 by linking pthreads
- Removed extra ; causing warnings with -Wpedantic
2025-05-06 17:18:54 +02:00
276283ff14 automated versioning (#175)
Some checks failed
Build on RHEL9 / build (push) Successful in 2m20s
Build on RHEL8 / build (push) Failing after 2m24s
Co-authored-by: mazzol_a <mazzol_a@pc17378.psi.ch>
Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
2025-05-06 14:48:54 +02:00
cf158e2dcd Added scurve fitting (#168)
Some checks failed
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
12ae1424fb consistent use of ssize_t instead of int64_t (#167)
Some checks failed
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
6db201f397 updated conda environment (#169)
- updated dev-env.yml conda environment file
- added boost-histogram as a requirement for the python tests
- added environment file in conda build process
2025-04-25 15:24:45 +02:00
d5226909fe Api cluster vector (#147)
Cluster is newly templated on ClusterSize, Cluster data type and cluster coordinate type, accepting arbitrary cluster sizes.
2025-04-25 12:29:39 +02:00
eb6862ff99 changed name of GainMap to InvertedGainMap
Some checks failed
Build on RHEL9 / build (push) Successful in 2m16s
Build on RHEL8 / build (push) Failing after 2m34s
2025-04-25 12:03:59 +02:00
f06e722dce changes from PR review 2025-04-25 11:38:56 +02:00
2e0424254c removed uneccecary codna numpy variants (#165)
With numpy 2.0 we no longer need to build against every supported numpy
version. This way we can save up to 6 builds.

- https://numpy.org/doc/stable/dev/depending_on_numpy.html
-
https://conda-forge.org/docs/maintainer/knowledge_base/#building-against-numpy
2025-04-25 10:31:40 +02:00
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
86d343f5f5 merged with developer
Some checks failed
Build on RHEL9 / build (push) Successful in 2m9s
Build on RHEL8 / build (push) Failing after 2m32s
2025-04-23 11:45:04 +02:00
fd0196f2fd Developer (#164)
All checks were successful
Build on RHEL9 / build (push) Successful in 1m58s
Build on RHEL8 / build (push) Successful in 2m22s
- State before merging the new cluster vector API

---------

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>
Co-authored-by: siebsi <sieb.patr@gmail.com>
2025-04-22 16:41:48 +02:00
129e7e9f9d Merge branch 'developer' of github.com:slsdetectorgroup/aare into developer
All checks were successful
Build on RHEL9 / build (push) Successful in 1m59s
Build on RHEL8 / build (push) Successful in 2m29s
2025-04-22 16:24:32 +02:00
58c934d9cf added mpl to conda specs 2025-04-22 16:24:15 +02:00
4088b0889d Merge branch 'main' into developer 2025-04-22 16:18:48 +02:00
d5f8daf194 removed debug option in CMakelist
All checks were successful
Build on RHEL9 / buildh (push) Successful in 2m36s
2025-04-22 16:16:31 +02:00
c6e8e5f6a1 inverted gain map 2025-04-22 16:16:27 +02:00
b501c31e38 added missed commit 2025-04-22 15:22:47 +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
84aafa75f6 Building wheels and uploading to pypi (#160)
All checks were successful
Build on RHEL9 / build (push) Successful in 1m56s
Build on RHEL8 / build (push) Successful in 2m13s
Still to be resolved in another PR: 

- Consistent versioning across compiled code, conda and pypi
2025-04-22 08:36:34 +02:00
177459c98a added multithreaded cluster finder test
All checks were successful
Build on RHEL9 / buildh (push) Successful in 2m20s
2025-04-17 17:09:53 +02:00
c49a2fdf8e removed cluster_2x2 and cluster3x3 specializations
All checks were successful
Build on RHEL9 / buildh (push) Successful in 1m58s
2025-04-16 16:40:42 +02:00
14211047ff added function warpper around ClusterFinderMT and ClusterCollector to construct object 2025-04-16 14:22:44 +02:00
acd9d5d487 moved parts of ClusterFile implementation into declaration
All checks were successful
Build on RHEL9 / buildh (push) Successful in 1m55s
2025-04-15 15:15:34 +02:00
d4050ec557 enum is now enum class 2025-04-15 14:57:25 +02:00
fca9d5d2fa replaced extract template parameters 2025-04-15 14:40:09 +02:00
1174f7f434 fixed calculate eta 2025-04-15 13:18:25 +02:00
2bb7d360bf Adding more tests, fixing hitmap and reading with cuts (#161)
- Fix for hitmap
- Fix for reading clusters with cut
- Added more tests around eta
- Added factory function for creating the cluster finder
2025-04-15 12:25:01 +02:00
a90e532b21 removed extra sum after merge
Some checks failed
Build on RHEL9 / buildh (push) Failing after 1m57s
2025-04-15 08:08:59 +02:00
8d8182c632 qMerge branch 'testing_clusters' of github.com:slsdetectorgroup/aare into testing_clusters 2025-04-15 08:05:12 +02:00
5f34ab6df1 minor comment 2025-04-15 08:05:05 +02:00
5c8a5099fd Merge branch 'api_cluster_vector' into testing_clusters 2025-04-14 16:40:47 +02:00
7c93632605 tests and fix 2025-04-14 16:38:25 +02:00
54def26334 added ClusterFile tests fixed some bugs in ClusterFile
All checks were successful
Build on RHEL9 / buildh (push) Successful in 1m55s
2025-04-14 15:48:09 +02:00
a59e9656be Making RawSubFile usable from Python (#158)
All checks were successful
Build on RHEL8 / build (push) Successful in 1m55s
Build on RHEL9 / build (push) Successful in 1m44s
- Removed a printout left from debugging
- return also header when reading
- added read_n 
- check for error in ifstream
2025-04-11 16:54:21 +02:00
3f753ec900 Some fixes (need more testing later) (#159)
Some checks failed
Build on RHEL9 / buildh (push) Failing after 1m51s
- Change of pointer size caused out of bounds write
- UB to write to memory reserved by std::vector::reserver --> allocate
dummy clusters by using resize instead
   - but now we can't reserve like we want to, need a fix. 
- format string not working, fixed
2025-04-11 14:43:12 +02:00
15e52565a9 dont convert to byte 2025-04-11 14:35:20 +02:00
e71569b15e resize before read 2025-04-11 13:38:33 +02:00
92f5421481 np test 2025-04-10 16:58:47 +02:00
113f34cc98 fixes 2025-04-10 16:50:04 +02:00
53a90e197e added additional tests
All checks were successful
Build on RHEL9 / buildh (push) Successful in 1m52s
2025-04-10 10:41:58 +02:00
6e4db45b57 Activated RH8 build on PSI gitea (#155)
All checks were successful
Build on RHEL8 / build (push) Successful in 1m56s
Build on RHEL9 / build (push) Successful in 1m44s
2025-04-10 10:17:16 +02:00
76f050f69f solved merge conflict
Some checks failed
Build on RHEL9 / buildh (push) Failing after 1m22s
2025-04-10 09:21:50 +02:00
a13affa4d3 changed template arguments added tests 2025-04-10 09:13:58 +02:00
8b0eee1e66 fixed warnings and removed ambiguous read_frame (#154)
All checks were successful
Build on RHEL9 / buildh (push) Successful in 1m47s
Fixed warnings:
- unused variable in Interpolator
- Narrowing conversions uint64-->int64

Removed an ambiguous function from JungfrauDataFile
- NDarry read_frame(header&=nullptr)
- Frame read_frame()

NDArray and NDView size() is now signed
2025-04-09 17:54:55 +02:00
894065fe9c added utility plot
All checks were successful
Build on RHEL9 / buildh (push) Successful in 1m48s
2025-04-09 12:19:14 +02:00
f16273a566 Adding support for Jungfrau .dat files (#152)
All checks were successful
Build on RHEL9 / buildh (push) Successful in 1m48s
closes #150 

**Not addressed in this PR:** 

- pixels_per_frame, bytes_per_frame and tell should be made cost in
FileInterface
2025-04-08 15:31:04 +02:00
20d1d02fda function signature for push back (#153)
Some checks failed
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Failing after 48s
This example now works:
```python
cl = Cluster3x3i(5,7,np.array((1,2,3,4,5,6,7,8,9), dtype = np.int32))
cv = ClusterVector_Cluster3x3i()
cv.push_back(cl)
```
2025-04-07 17:18:17 +02:00
10e4e10431 function signature for push back 2025-04-07 15:33:37 +02:00
017960d963 added push_back property
Some checks failed
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Failing after 37s
2025-04-07 13:41:14 +02:00
a12e43b176 underlying container of ClusterVcetor is now a std::vector 2025-04-07 12:27:44 +02:00
9de84a7f87 added some python tests
Some checks failed
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Failing after 41s
2025-04-04 17:19:15 +02:00
885309d97c fix build
Some checks failed
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Failing after 43s
2025-04-03 17:14:28 +02:00
e24ed68416 fixed include 2025-04-03 16:50:02 +02:00
248d25486f refactored python files 2025-04-03 16:38:12 +02:00
7db1ae4d94 Dev/gitea ci (#151)
All checks were successful
Build on RHEL9 / buildh (push) Successful in 1m41s
Build and test on internal PSI gitea
2025-04-03 13:18:55 +02:00
a24bbd9cf9 started to do python refactoring
Some checks failed
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Failing after 44s
2025-04-03 11:56:25 +02:00
d7ef9bb1d8 missed some refactoring of datatypes
Some checks failed
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Failing after 49s
2025-04-03 11:36:15 +02:00
de9fc16e89 generalize is_selected 2025-04-03 09:28:54 +02:00
85a6b5b95e suppress compiler warnings 2025-04-03 09:28:02 +02:00
50eeba4005 restructured GainMap to have own class and generalized
Some checks failed
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Failing after 40s
2025-04-02 17:58:26 +02:00
98d2d6098e refactored other cpp files 2025-04-02 16:00:46 +02:00
61af1105a1 templated eta and updated test 2025-04-02 14:42:38 +02:00
240960d3e7 generalized FindCluster to read in general cluster sizes - assuming that finding cluster center is equal for all clusters 2025-04-02 12:05:16 +02:00
04728929cb implemented sum_2x2() for general clusters, only one calculate_eta2 function for all clusters
Some checks failed
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Failing after 37s
2025-04-01 18:29:08 +02:00
3083d51699 merge conflict 2025-04-01 17:50:11 +02:00
4240942cec solved merge conflict 2025-04-01 17:48:48 +02:00
745d09fbe9 changed push_back to take Cluster as input argument 2025-04-01 15:30:10 +02:00
e1533282f1 Cluster cuts (#146)
Some checks failed
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
8cad7a50a6 fixed py
Some checks failed
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Failing after 42s
2025-04-01 15:00:03 +02:00
9d8e803474 Merge branch 'main' into developer 2025-04-01 14:35:27 +02:00
a42c0d645b added roi, noise and gain (#143)
- Moved definitions of Cluster_2x2 and Cluster_3x3 to it's own file
- Added optional members for ROI, noise_map and gain_map in ClusterFile

**API:**

After creating the ClusterFile the user can set one or all of: roi,
noise_map, gain_map

```python
f = ClusterFile(fname)
f.set_roi(roi) #aare.ROI
f.set_noise_map(noise_map) #numpy array
f.set_gain_map(gain_map) #numpy array
```

**When reading clusters they are evaluated in the order:**

1. If ROI is enabled check that the cluster is within the ROI
1. If noise_map is enabled check that the cluster meets one of the
conditions
    - Center pixel above noise
    - Highest 2x2 sum above 2x noise
    - 3x3 sum above 3x noise
1. If gain_map is set apply the gain map before returning the clusters
(not used for noise cut)

**Open questions:**
1. Check for out of bounds access in noise and gain map?

closes #139 
closes #135 
closes #90
2025-04-01 14:31:25 +02:00
508adf5016 refactoring of remaining files
Some checks failed
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Failing after 40s
Build the package using cmake then documentation / deploy (push) Has been skipped
2025-04-01 10:01:23 +02:00
e038bd1646 refactored and put calculate_eta function in seperate file 2025-03-31 17:35:39 +02:00
7e5f91c6ec added benchmark to time generalize calculate_eta - twice as long so will keep specific version for 2x2 and 3x3 clusters 2025-03-31 17:04:57 +02:00
ed9ef7c600 removed analyze_cluster function as not used anymore
Some checks failed
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Failing after 52s
Build the package using cmake then documentation / deploy (push) Has been skipped
2025-03-31 12:26:29 +02:00
57bb6c71ae ClusterSize should be larger than 1
Some checks failed
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Failing after 51s
Build the package using cmake then documentation / deploy (push) Has been skipped
2025-03-28 14:49:55 +01:00
f8f98b6ec3 Generalized calculate_eta2 function to work with general cluster types 2025-03-28 14:29:20 +01:00
0876b6891a cpp Cluster and ClusterVector and ClusterFile are templated now, they support generic cluster types 2025-03-25 21:42:50 +01:00
6ad76f63c1 Fixed reading clusters with ROI (#142)
Some checks failed
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Failing after 9s
Fixed incorrect reading of clusters with ROI


closes #141
2025-03-24 14:28:10 +01:00
6e7e81b36b complete mess but need to install RedHat 9 2025-03-21 16:32:54 +01:00
5d8ad27b21 Developer (#138)
All checks were successful
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Successful in 1m45s
- Fully functioning variable size cluster finder
- Added interpolation
- Bit reordering for ADC SAR 05

---------

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 <xiangyu.xie@psi.ch>
2025-03-20 12:52:04 +01:00
b529b6d33b Merge branch 'main' into developer
All checks were successful
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Successful in 1m33s
2025-03-19 19:29:15 +01:00
602b04e49f bumped version number
All checks were successful
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Successful in 1m35s
2025-03-18 17:47:05 +01:00
11cd2ec654 Interpolate (#137)
- added eta based interpolation
2025-03-18 17:45:38 +01:00
e59a361b51 removed workspace
Some checks failed
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Failing after 48s
Build the package using cmake then documentation / deploy (push) Has been skipped
2025-03-17 15:23:55 +01:00
1ad362ccfc added action for gitea (#136)
All checks were successful
Build the package using cmake then documentation / build (ubuntu-latest, 3.12) (push) Successful in 1m30s
2025-03-17 15:21:59 +01:00
332bdeb02b modified algo 2025-03-14 11:07:09 +01:00
3a987319d4 WIP 2025-03-05 21:51:23 +01:00
5614cb4673 WIP 2025-03-05 17:40:08 +01:00
8ae6bb76f8 removed warnings added clang-tidy 2025-02-21 11:18:39 +01:00
1d2c38c1d4 Enable VarClusterFinder (#134)
Co-authored-by: xiangyu.xie <xiangyu.xie@psi.ch>
2025-02-19 16:11:24 +01:00
b7a47576a1 Multi threaded fitting and returning chi2 (#132)
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>
2025-02-19 07:19:59 +01:00
fc1c9f35d6 Merge branch 'main' into developer 2025-02-18 21:52:20 +01:00
5d2f25a6e9 bumped version number 2025-02-18 21:44:03 +01:00
6a83988485 Added chi2 to fit results (#131)
- fit_gaus and fit_pol1 now return a dict
- calculate chi2 after fit
- cleaned up code
2025-02-18 21:13:27 +01:00
8abfc68138 fixed linking to lmfit (#130)
using "$<BUILD_INTERFACE:lmfit>" to exclude the target lmfit from being
included in the installed aare target
2025-02-18 15:54:52 +01:00
8ff6f9f506 fixed linking to lmfit 2025-02-18 15:49:46 +01:00
dadf5f4869 Added fitting, fixed roi etc (#129)
Co-authored-by: Patrick <patrick.sieberer@psi.ch>
Co-authored-by: JulianHeymes <julian.heymes@psi.ch>
2025-02-12 16:50:31 +01:00
dcb9a98faa bumped version 2025-02-12 16:49:30 +01:00
7309cff47c Added fitting with lmfit (#128)
- added stand alone fitting using:
https://jugit.fz-juelich.de/mlz/lmfit.git
- fit_gaus, fit_pol1 with and without errors
- multi threaded fitting

---------

Co-authored-by: JulianHeymes <julian.heymes@psi.ch>
2025-02-12 16:35:48 +01:00
c0c5e07ad8 added decoding of adc_sar_04 (#127) 2025-02-12 16:17:32 +01:00
2faa317bdf removed debug line 2025-02-12 10:59:18 +01:00
f7031d7f87 Update CMakeLists.txt
Removed flto=auto which caused issues with gcc 8.5
2025-02-12 10:52:55 +01:00
d86cb533c8 Fix minor warnings (#126)
- Unused variables
- signed vs. unsigned
- added -flto=auto
2025-02-11 11:48:01 +01:00
4c750cc3be Fixing ROI read of RawFile (#125)
- Bugfixes
- New abstraction for detector geometry
- Tests for updating geo with ROI
2025-02-11 11:08:22 +01:00
e96fe31f11 removed main and token 2025-02-05 15:55:55 +01:00
cd5a738696 disable upload on dev 2025-02-05 15:44:45 +01:00
1ba43b69d3 fix 2025-02-05 15:16:16 +01:00
fff536782b disable auto upload 2025-02-05 15:13:53 +01:00
5a3ca2ae2d Decoding for ADC SAR 05 64->16bit (#124)
Co-authored-by: Patrick <patrick.sieberer@psi.ch>
2025-02-05 14:40:26 +01:00
078e5d81ec docs 2025-01-15 16:40:34 +01:00
6cde968c60 summing 2x2 2025-01-15 16:12:06 +01:00
f6d736facd docs for ClusterFile 2025-01-15 09:15:41 +01:00
e1cc774d6c Multi threaded cluster finder (#117) 2025-01-14 21:36:25 +01:00
d0f435a7ab bounds checking on subfiles 2025-01-10 19:02:50 +01:00
7ce02006f2 clear pedestal 2025-01-10 17:26:23 +01:00
7550a2cb97 fixing read bug 2025-01-10 15:33:56 +01:00
caf7b4ecdb added docs for ClusterFinderMT 2025-01-10 10:22:04 +01:00
72d10b7735 Multi threaded cluster finder. (#115)
Added a prototype for the multi threaded cluster finder including python
bindings
2025-01-09 16:55:35 +01:00
cc95561eda MultiThreaded Cluster finder 2025-01-09 16:53:22 +01:00
dc9e10016d WIP 2025-01-08 16:45:24 +01:00
21ce7a3efa bumped version 2025-01-07 16:33:16 +01:00
acdce8454b moved pd to double 2025-01-07 15:01:43 +01:00
d07da42745 bitdepths 2025-01-07 12:27:01 +01:00
7d6223d52d Cluster finder improvements (#113) 2024-12-16 14:42:18 +01:00
da67f58323 Cluster finder improvements (#112) 2024-12-16 14:26:35 +01:00
e6098c02ef bumped version 2024-12-16 14:24:46 +01:00
29b1dc8df3 missing header 2024-12-13 14:57:36 +01:00
f88b53387f WIP 2024-12-12 17:58:04 +01:00
a0f481c0ee mod pedestal 2024-12-12 14:34:10 +01:00
b3a9e9576b WIP 2024-12-11 16:27:36 +01:00
60534add92 WIP 2024-12-11 09:54:33 +01:00
7f2a23d5b1 accumulating clusters in one array 2024-12-10 22:00:12 +01:00
6a150e8d98 WIP 2024-12-10 17:21:05 +01:00
0b252709bd rank of virtual parameters is 2 and not 1 as in single module, single file acquisition 2024-12-05 01:02:48 +01:00
e5df929a9a minor semicolon typo. and fix error message 2024-12-05 00:15:07 +01:00
b7337fc6c5 including header 2024-12-04 15:38:10 +01:00
09de69c090 python works 2024-12-04 15:02:57 +01:00
b23e697e26 works for hdf5, needs refactoring 2024-12-04 00:52:36 +01:00
4233509615 first draft of hdf5, reads master metadata, reads data dims, process of hyperslab 2024-12-03 21:16:58 +01:00
b43003966f build pkg on all branched deploy docs on main 2024-11-29 16:41:42 +01:00
c2d039a5bd fix conda build 2024-11-29 16:37:42 +01:00
6fd52f6b8d added missing enums (#111)
- Missing enums
- Matching values to slsDetectorPackage
- tests
2024-11-29 15:28:19 +01:00
659f1f36c5 AARE_INSTALL_PYTHONEXT (#109)
- added AARE_INSTALL_PYTHONEXT option to install also python files in
aare folder
2024-11-29 15:28:02 +01:00
0047d15de1 removed print flip 2024-11-29 15:00:18 +01:00
a1b7fb8fc8 added missing enums 2024-11-29 14:56:39 +01:00
2e4a491d7a CMAKE_INSTALL_PREFIX not needed to specify destination folder and removed 2024-11-29 14:38:32 +01:00
fdce2f69b9 python 3.10 required in cmake 2024-11-29 11:07:05 +01:00
ada4d41f4a bugfix on iteration and returning master file (#110) 2024-11-29 08:52:04 +01:00
115dfc0abf bugfix on iteration and returning master file 2024-11-28 21:14:40 +01:00
31b834c3fd added AARE_INSTALL_PYTHONEXT option to install python in make install, which also installs the python files in the aare folder 2024-11-28 15:18:13 +01:00
feed4860a6 Developer (#108)
- Support for very old moench
- read_n in RawFile
2024-11-27 21:22:01 +01:00
0df8e4bb7d added support for old old moench files 2024-11-27 16:27:55 +01:00
8bf9ac55ce modified read_n also for File and RawFile 2024-11-27 09:31:57 +01:00
2d33fd4813 Streamlined build, new transforms (#106) 2024-11-26 16:27:00 +01:00
996a8861f6 roll back conda-build 2024-11-26 15:53:06 +01:00
06670a7e24 read_n returns remaining frames (#105)
Modified read_n to return the number of frames available if less than
the number of frames requested.

```python
#f is a CtbRawFile containing 10 frames

f.read_n(7) # you get 7 frames
f.read_n(7) # you get 3 frames
f.read_n(7) # RuntimeError
```

Also added support for chunk_size when iterating over a file:

```python
# The file contains 10 frames


with CtbRawFile(fname, chunk_size = 7) as f:
    for headers, frames in f:
        #do something with the data
        # 1 iteration 7 frames
        # 2 iteration 3 frames
        # 3 iteration stops
```
2024-11-26 14:07:21 +01:00
8e3d997bed read_n returns remaining frames 2024-11-26 12:07:17 +01:00
a3f813f9b4 Modified moench05 transform (#103)
Moench05 transforms: 
- moench05: Works with the updated firmware and better data compression
(adcenable10g=0xFF0F)
- moench05_old: Works with the previous data and can be used with
adcenable10g=0xFFFFFFFF
- moench05_1g: For the 1g data acquisition only with adcenable=0x2202
2024-11-26 09:02:33 +01:00
d48482e9da Modified moench05 transform: new firmware (moench05), legacy firmware (moench05_old), 1g readout (moench05_1g) 2024-11-25 16:39:08 +01:00
8f729fc83e Developer (#102) 2024-11-21 10:27:26 +01:00
f9a2d49244 removed extra print 2024-11-21 10:22:22 +01:00
9f7cdbcb48 conversion warnings 2024-11-18 18:18:55 +01:00
3b0e13e41f added links (#101) 2024-11-18 16:19:15 +01:00
3af8182998 added links 2024-11-18 16:18:29 +01:00
99e829fd06 Latest changes (#100) 2024-11-18 15:42:37 +01:00
47e867fc1a Merge branch 'main' into developer 2024-11-18 15:38:15 +01:00
8ea4372cf1 fix 2024-11-18 15:33:38 +01:00
75f83e5e3b detecting need to link with stdfs 2024-11-18 15:33:09 +01:00
30d05f9203 detecting need to link with stdfs 2024-11-18 15:19:57 +01:00
37d3dfcf71 WIP 2024-11-18 14:46:28 +01:00
35c6706b3c docs 2024-11-18 14:39:46 +01:00
9ab61cac4e deps in pkg 2024-11-18 11:47:26 +01:00
13394c3a61 cmake targets 2024-11-18 11:30:33 +01:00
088288787a Merge branch 'developer' of github.com:slsdetectorgroup/aare into developer 2024-11-18 09:22:36 +01:00
9d4459eb8c linking json with PUBLIC to avoid errors 2024-11-18 09:22:28 +01:00
95ff77c8fc Cluster reading, expression templates (#99)
Co-authored-by: froejdh_e <erik.frojdh@psi.ch>
2024-11-15 16:32:36 +01:00
62a14dda13 Merge branch 'main' into developer 2024-11-15 16:19:34 +01:00
632c2ee0c8 bumped version 2024-11-15 16:15:04 +01:00
17f8d28019 frame reading for cluster file 2024-11-15 16:13:46 +01:00
e77b615293 Added expression templates (#98)
- Works with NDArray
- Works with NDView
2024-11-15 15:17:52 +01:00
0d058274d5 WIP 2024-11-14 17:03:16 +01:00
5cde7a99b5 WIP 2024-11-14 17:02:48 +01:00
dcedb4fb13 added missing header 2024-11-14 16:37:24 +01:00
7ffd732d98 ported reading clusters (#95) 2024-11-14 16:22:38 +01:00
fbaf9dce89 Developer (#94) 2024-11-14 08:03:18 +01:00
dc889dab76 removed subfile from cmake 2024-11-14 07:48:59 +01:00
cb94d079af Merge branch 'developer' of github.com:slsdetectorgroup/aare into developer 2024-11-14 07:42:00 +01:00
13b2cb40b6 docs and reorder 2024-11-14 07:41:50 +01:00
17917ac7ea Merge branch 'main' into developer 2024-11-12 16:44:15 +01:00
db936b6357 improved documentation 2024-11-12 16:39:03 +01:00
2ee1a5583e WIP 2024-11-12 09:27:01 +01:00
349e3af8e1 Brining in changes (#93) 2024-11-11 19:59:55 +01:00
a0b6c4cc03 Merge branch 'main' into developer 2024-11-11 18:52:23 +01:00
5f21759c8c removed prints, bumped version 2024-11-11 18:22:18 +01:00
ecf1b2a90b WIP 2024-11-11 17:13:48 +01:00
b172c7aa0a starting work on ROI 2024-11-07 16:24:48 +01:00
d8d1f0c517 Taking v1 as the first release (#92)
- file reading
- decoding master file
2024-11-07 10:14:20 +01:00
d5fb823ae4 added numpy variants 2024-11-07 09:16:49 +01:00
9c220bff51 added simple decoding of scan parameters 2024-11-07 08:14:33 +01:00
b2e5c71f9c MH02 1-4 counters 2024-11-06 21:32:03 +01:00
cbfd1f0b6c ClusterFinder 2024-11-06 12:41:41 +01:00
5b2809d6b0 working Moench03 detector type 2024-11-06 10:13:56 +01:00
4bb8487e2c added moench03 back 2024-11-06 09:18:57 +01:00
1cc7690f9a discard partial 2024-11-06 09:13:40 +01:00
25812cb291 RawFile is now using RawMasterFile 2024-11-06 09:10:09 +01:00
654c1db3f4 WIP 2024-11-05 16:01:22 +01:00
2efb763242 func to prop 2024-11-05 16:00:11 +01:00
7f244e22a2 extra methods in CtbRawFile 2024-11-05 15:55:17 +01:00
d98b45235f optional 2024-11-05 14:37:35 +01:00
80a39415de added CtbRawFile 2024-11-05 14:36:18 +01:00
b8a4498379 WIP 2024-10-31 18:03:17 +01:00
49da039ff9 working on 05 2024-10-31 15:35:43 +01:00
563c39c0dd decoding of old Moench03 2024-10-31 11:53:24 +01:00
ae1166b908 WIP 2024-10-31 10:39:52 +01:00
ec61132296 WIP 2024-10-31 10:29:07 +01:00
cee0d71b9c added check to prevent segfault on missing subfile 2024-10-31 09:43:41 +01:00
19c6a4091f improved docs and added PixelMap 2024-10-31 08:56:12 +01:00
92d9c28c73 numpy in conda env for docs 2024-10-30 18:35:54 +01:00
b7e6962e44 added numpy as dep 2024-10-30 18:09:29 +01:00
13ac6b0f37 added missing numpy dependency 2024-10-30 17:54:34 +01:00
79d924c2a3 docs and version bump 2024-10-30 17:48:50 +01:00
9b733fd0ec WIP 2024-10-30 17:41:45 +01:00
6505f37d87 added type bindings 2024-10-30 17:40:47 +01:00
a466887064 added variable cluster finder 2024-10-30 17:22:57 +01:00
dde92b993f xml back in 2024-10-30 16:29:43 +01:00
1b61155c5c another try 2024-10-30 16:15:44 +01:00
738934f2a0 added github token 2024-10-30 16:12:08 +01:00
6b8f2478b6 added deploy 2024-10-30 16:04:11 +01:00
41fbddb750 pinned sphinx version 2024-10-30 15:56:27 +01:00
504e8b4565 updated doxyfile 2024-10-30 15:53:40 +01:00
acdcaac338 fmt 2024-10-30 15:39:04 +01:00
8b43011fa1 modified action 2024-10-30 15:37:23 +01:00
801adccbd7 updated path for docs 2024-10-30 15:28:07 +01:00
da5ba034b8 WIP 2024-10-30 15:18:48 +01:00
1cbded04f8 doxygen 2024-10-30 15:14:55 +01:00
9b33ad0ee8 pybind 2024-10-30 15:13:20 +01:00
1f539a234b forgot json 2024-10-30 15:11:52 +01:00
29a42507d7 WIP 2024-10-30 15:09:35 +01:00
5035c20aa4 added action for docs 2024-10-30 15:07:34 +01:00
f754e0f769 file reading 2024-10-30 14:53:50 +01:00
be019b9769 updated readme 2024-10-30 10:26:53 +01:00
af4f000fe7 fetch content for json 2024-10-30 09:36:41 +01:00
b37f4845cf cmake defaults 2024-10-30 08:58:42 +01:00
b037aebc5f update 2024-10-30 08:36:38 +01:00
dea5aaf9cf slight mod 2024-10-30 08:33:22 +01:00
4cc6aa9d40 updated workflows 2024-10-30 08:11:38 +01:00
c3a5d22f83 added anaconda-client 2024-10-29 17:54:02 +01:00
a8afa04129 updated workflow 2024-10-29 17:50:44 +01:00
eb855fb9a3 updated workflow 2024-10-29 17:49:21 +01:00
b4fe044679 WIP 2024-10-29 17:00:58 +01:00
082d793161 WIP 2024-10-29 16:46:02 +01:00
9f29f173ff updated path 2024-10-29 13:09:14 +01:00
8a10bcbbdb workflow 2024-10-29 13:07:53 +01:00
c509e29b52 building with scikit build 2024-10-29 11:19:20 +01:00
1a16d4522e WIP 2024-10-28 16:50:38 +01:00
8a435cbe9b WIP 2024-10-28 16:26:14 +01:00
7f9151f270 WIP 2024-10-28 13:37:58 +01:00
abb1d20ca3 WIP 2024-10-28 12:25:47 +01:00
a4fb217e3f Files and structure for python interface 2024-10-28 11:22:12 +01:00
5d643dc133 added cluster finder 2024-10-25 16:18:36 +02:00
54dd88f070 added documentation 2024-10-25 13:54:36 +02:00
b1b020ad60 WIP 2024-10-25 10:23:34 +02:00
1025 changed files with 17374 additions and 95710 deletions

Binary file not shown.

View File

@ -2,6 +2,6 @@ BasedOnStyle: LLVM
IndentWidth: 4
UseTab: Never
ColumnLimit: 120
ColumnLimit: 80
AlignConsecutiveAssignments: false
AlignConsecutiveMacros: true

View File

@ -1,50 +1,35 @@
---
Checks: '*,
-abseil-*
-readability-magic-numbers,
-misc-include-cleaner,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-owning-memory,
-bugprone-easily-swappable-parameters,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-special-member-functions,
-hicpp-special-member-functions,
-cert-err33-c,
-modernize-pass-by-value,
-altera-*,
-android-cloexec-fopen,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-fuchsia*,
-readability-else-after-return,
-readability-avoid-const-params-in-decls,
-readability-identifier-length,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-type-reinterpret-cast,
-llvm-header-guard,
-modernize-use-nodiscard,
-misc-non-private-member-variables-in-classes,
-readability-static-accessed-through-instance,
-readability-braces-around-statements,
-readability-isolate-declaration,
-readability-implicit-bool-conversion,
-readability-identifier-length,
-readability-identifier-naming,
-hicpp-signed-bitwise,
-hicpp-no-array-decay,
-hicpp-braces-around-statements,
-google-runtime-references,
-google-readability-todo,
-google-readability-braces-around-statements,
-modernize-use-trailing-return-type,
-llvmlibc-*
'
HeaderFilterRegex: '*.hpp'
ImplementationFileExtensions: [cpp]
AnalyzeTemporaryDtors: false
WarningsAsErrors: '*,
-bugprone-implicit-widening-of-multiplication-result'
---
Checks: '*,
-altera-*,
-android-cloexec-fopen,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-fuchsia*,
-readability-else-after-return,
-readability-avoid-const-params-in-decls,
-readability-identifier-length,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-type-reinterpret-cast,
-llvm-header-guard,
-modernize-use-nodiscard,
-misc-non-private-member-variables-in-classes,
-readability-static-accessed-through-instance,
-readability-braces-around-statements,
-readability-isolate-declaration,
-readability-implicit-bool-conversion,
-readability-identifier-length,
-readability-identifier-naming,
-hicpp-signed-bitwise,
-hicpp-no-array-decay,
-hicpp-braces-around-statements,
-google-runtime-references,
-google-readability-todo,
-google-readability-braces-around-statements,
-modernize-use-trailing-return-type,
-llvmlibc-*'
HeaderFilterRegex: \.hpp
FormatStyle: none
CheckOptions:
- { key: readability-identifier-naming.NamespaceCase, value: lower_case }

View File

@ -1,103 +0,0 @@
compilation_database_dir: ./build
output_directory: docs/diagrams
diagrams:
aare_class:
type: class
using_namespace: aare
include:
namespaces:
- aare
exclude:
element_types:
- enum
access:
- private
- protected
- public
glob:
- core/src/*.cpp
- file_io/src/*.cpp
- network_io/src/*.cpp
- utils/src/*.cpp
aare_class_simplified:
type: class
using_namespace: aare
include:
context:
- match:
radius: 1
pattern: aare::FileInterface
- match:
radius: 2
pattern: aare::ZmqSocket
- match:
radius: 2
pattern: aare::Frame
namespaces:
- aare
exclude:
elements:
- aare::xy
element_types:
- enum
access:
- private
- protected
- public
glob:
- core/src/*.cpp
- file_io/src/*.cpp
- network_io/src/*.cpp
- utils/src/*.cpp
# aare_package:
# type: package
# package_type: directory
# include:
# paths:
# - core
# - file_io
# - network_io
# - utils
# - tests
file_io_class:
type: class
# generate_packages: true
# package_type: directory
include:
context:
- aare::FileInterface
- aare::File
namespaces:
- aare
# relationships:
# - inheritance
glob:
- file_io/src/*.cpp
network_io_class:
type: class
include:
paths:
- network_io/include/aare/network_io/*.hpp
- core/include/aare/core/Frame.hpp
namespaces:
- aare
glob:
- network_io/src/*.cpp
core_class:
type: class
include:
paths:
- core/include/aare/core/*.hpp
namespaces:
- aare
glob:
- core/src/*.cpp

1
.env
View File

@ -1 +0,0 @@
export AARE_ROOT_DIR="/home/bb/github/aare/"

1
.gitattributes vendored
View File

@ -1 +0,0 @@
*.ipynb -linguist-detectable

View File

@ -0,0 +1,58 @@
name: Build the package using cmake then documentation
on:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, ]
python-version: ["3.12", ]
runs-on: ${{ matrix.platform }}
defaults:
run:
shell: "bash -l {0}"
steps:
- uses: actions/checkout@v4
- name: Setup dev env
run: |
sudo apt-get update
sudo apt-get -y install cmake gcc g++
- name: Get conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
environment-file: etc/dev-env.yml
miniforge-version: latest
channels: conda-forge
conda-remove-defaults: "true"
- name: Build library
run: |
mkdir build
cd build
cmake .. -DAARE_SYSTEM_LIBRARIES=ON -DAARE_DOCS=ON
make -j 2
make docs

View File

@ -0,0 +1,36 @@
name: Build on RHEL8
on:
push:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: "ubuntu-latest"
container:
image: gitea.psi.ch/images/rhel8-developer-gitea-actions
steps:
# workaround until actions/checkout@v4 is available for RH8
# - uses: actions/checkout@v4
- name: Clone repository
run: |
echo Cloning ${{ github.ref_name }}
git clone https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git --branch=${{ github.ref_name }} .
- name: Install dependencies
run: |
dnf install -y cmake python3.12 python3.12-devel python3.12-pip
- name: Build library
run: |
mkdir build && cd build
cmake .. -DAARE_PYTHON_BINDINGS=ON -DAARE_TESTS=ON -DPython_FIND_VIRTUALENV=FIRST
make -j 2
- name: C++ unit tests
working-directory: ${{gitea.workspace}}/build
run: ctest

View File

@ -0,0 +1,31 @@
name: Build on RHEL9
on:
push:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: "ubuntu-latest"
container:
image: gitea.psi.ch/images/rhel9-developer-gitea-actions
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
dnf install -y cmake python3.12 python3.12-devel python3.12-pip
- name: Build library
run: |
mkdir build && cd build
cmake .. -DAARE_PYTHON_BINDINGS=ON -DAARE_TESTS=ON
make -j 2
- name: C++ unit tests
working-directory: ${{gitea.workspace}}/build
run: ctest

View File

@ -0,0 +1,42 @@
name: Build pkgs and deploy if on main
on:
release:
types:
- published
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, ] # macos-12, windows-2019]
python-version: ["3.12",]
runs-on: ${{ matrix.platform }}
# The setup-miniconda action needs this to activate miniconda
defaults:
run:
shell: "bash -l {0}"
steps:
- uses: actions/checkout@v4
- name: Get conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
environment-file: etc/dev-env.yml
miniforge-version: latest
channels: conda-forge
conda-remove-defaults: "true"
- name: Enable upload
run: conda config --set anaconda_upload yes
- name: Build
env:
CONDA_TOKEN: ${{ secrets.CONDA_TOKEN }}
run: conda build conda-recipe --user slsdetectorgroup --token ${CONDA_TOKEN}

41
.github/workflows/build_conda.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: Build pkgs and deploy if on main
on:
push:
branches:
- developer
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, ] # macos-12, windows-2019]
python-version: ["3.12",]
runs-on: ${{ matrix.platform }}
# The setup-miniconda action needs this to activate miniconda
defaults:
run:
shell: "bash -l {0}"
steps:
- uses: actions/checkout@v4
- name: Get conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
environment-file: etc/dev-env.yml
miniforge-version: latest
channels: conda-forge
conda-remove-defaults: "true"
- name: Disable upload
run: conda config --set anaconda_upload no
- name: Build
run: conda build conda-recipe

69
.github/workflows/build_docs.yml vendored Normal file
View File

@ -0,0 +1,69 @@
name: Build the package using cmake then documentation
on:
workflow_dispatch:
pull_request:
release:
types:
- published
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, ]
python-version: ["3.12",]
runs-on: ${{ matrix.platform }}
defaults:
run:
shell: "bash -l {0}"
steps:
- uses: actions/checkout@v4
- name: Get conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
environment-file: etc/dev-env.yml
miniforge-version: latest
channels: conda-forge
conda-remove-defaults: "true"
- name: Build library
run: |
mkdir build
cd build
cmake .. -DAARE_SYSTEM_LIBRARIES=ON -DAARE_DOCS=ON
make -j 2
make docs
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: build/docs/html/
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: (github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'workflow_dispatch' )
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

64
.github/workflows/build_wheel.yml vendored Normal file
View File

@ -0,0 +1,64 @@
name: Build wheel
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
release:
types:
- published
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest,]
steps:
- uses: actions/checkout@v4
- name: Build wheels
run: pipx run cibuildwheel==2.23.0
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1

View File

@ -1,98 +0,0 @@
name: Build and run tests
on:
workflow_call:
inputs:
use-system-libraries: # the variable you can use in place of a matrix
required: true
type: string
default: OFF
build-type:
required: true
type: string
default: Debug
use-python-bindings:
required: true
type: string
default: OFF
os:
required: true
type: string
default: ubuntu-latest
jobs:
build-and-test:
name: "Build and test[os: ${{ inputs.os }}, build-type: ${{ inputs.build-type }}, use-system-libraries: ${{ inputs.use-system-libraries }}, use-python-bindings: ${{ inputs.use-python-bindings }}]"
runs-on: ${{ inputs.os }}
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
JOB_CONTEXT: ${{ toJson(job) }}
STEPS_CONTEXT: ${{ toJson(steps) }}
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: |
echo "$GITHUB_CONTEXT"
echo "$JOB_CONTEXT"
echo "$STEPS_CONTEXT"
echo "$RUNNER_CONTEXT"
echo "The job_id is: $GITHUB_JOB" # reference the default environment variables
echo "The id of this action is: $GITHUB_ACTION" # reference the default environment variables
echo "The run id is: $GITHUB_RUN_ID"
echo "The GitHub Actor's username is: $GITHUB_ACTOR"
echo "GitHub SHA: $GITHUB_SHA"
- name: print inputs
run: |
echo "use-system-libraries: ${{inputs.use-system-libraries}}"
echo "build-type: ${{inputs.build-type}}"
echo "use-python-bindings: ${{inputs.use-python-bindings}}"
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
if: ${{ contains(inputs.use-system-libraries, 'ON')}}
with:
micromamba-version: '1.5.6-0' # any version from https://github.com/mamba-org/micromamba-releases
environment-file: aare-environment.yml
init-shell: bash
cache-environment: true
post-cleanup: 'all'
- name: build
shell: bash -el {0}
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{inputs.build-type}} -DAARE_PYTHON_BINDINGS=${{inputs.use-python-bindings}} -DAARE_SYSTEM_LIBRARIES=${{inputs.use-system-libraries}}
cmake --build . -j
- name: run tests
run: |
cd build/
./run_tests
if: ${{ inputs.os != 'windows-latest' }}
- name: run tests
run: |
cd build/
dir
cd Debug/
dir
start run_tests.exe
# start /B /WAIT "run_tests.exe"
if: ${{ inputs.os == 'windows-latest' }}
- name: run examples
if: ${{ inputs.os != 'windows-latest' }}
# find all examples in build/examples and run them
run: |
pwd
export AARE_ROOT_DIR="$PWD"
ls build/examples/*_example
# examples to run
cd build/examples
examples=(raw_example json_example logger_example multiport_example mythen_example)
examples+=(numpy_read_example numpy_write_example)
for example in "${examples[@]}"; do
echo "Running example: $example"
./$example
done

View File

@ -1,33 +0,0 @@
# config file to run multiple jobs in parallel with matrix strategy
name: Config Workflow
on:
push:
jobs:
build-and-test:
strategy:
# super important if you want to see all results, even if one fails
# fail-fast is true by default
fail-fast: false
matrix:
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
build-type: ["Release", "Debug"]
use-system-libraries: ["ON", "OFF"]
use-python-bindings: ["OFF", "ON"]
exclude:
# excludes combinations that are not supported
- os: "windows-latest"
build-type: "Release" # TODO: fix this
- os: "windows-latest"
build-type: "Debug"
use-system-libraries: "ON" # different _ITERATOR_DEBUG_LEVEL for system libraries
uses: ./.github/workflows/common-workflow.yml # calls the one above
with:
use-system-libraries: ${{ matrix.use-system-libraries }}
build-type: ${{ matrix.build-type }}
use-python-bindings: ${{ matrix.use-python-bindings }}
os: ${{ matrix.os }}
secrets: inherit

13
.gitignore vendored
View File

@ -1,6 +1,4 @@
.vscode
.env
.env.dev
install/
.cproject
.project
bin/
@ -11,10 +9,17 @@ bin/
*.toc
*.o
*.so
build/**
.*
build/
RELEASE.txt
Testing/
ctbDict.cpp
ctbDict.h
wheelhouse/
dist/
*.pyc
*/__pycache__/*

View File

@ -1,6 +0,0 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}

View File

@ -1,17 +1,32 @@
cmake_minimum_required(VERSION 3.12)
set(CMAKE_CXX_STANDARD 17) #TODO! Global or per target?
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
cmake_minimum_required(VERSION 3.15)
project(aare
VERSION 0.1
DESCRIPTION "Data processing library for PSI detectors"
HOMEPAGE_URL "https://github.com/slsdetectorgroup/aare"
LANGUAGES C CXX
)
cmake_policy(SET CMP0135 NEW)
# Read VERSION file into project version
set(VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/VERSION")
file(READ "${VERSION_FILE}" VERSION_CONTENT)
string(STRIP "${VERSION_CONTENT}" PROJECT_VERSION_STRING)
set(PROJECT_VERSION ${PROJECT_VERSION_STRING})
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
execute_process(
COMMAND git log -1 --format=%h
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
OUTPUT_VARIABLE GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message(STATUS "Building from git hash: ${GIT_HASH}")
if (${CMAKE_VERSION} VERSION_GREATER "3.24")
cmake_policy(SET CMP0135 NEW) #Fetch content download timestamp
endif()
cmake_policy(SET CMP0079 NEW)
include(GNUInstallDirs)
@ -19,23 +34,38 @@ include(FetchContent)
#Set default build type if none was specified
include(cmake/helpers.cmake)
default_build_type("Release")
set_std_fs_lib()
message(STATUS "Extra linking to fs lib:${STD_FS_LIB}")
option(AARE_USE_WARNINGS "Enable warnings" ON)
option(AARE_PYTHON_BINDINGS "Build python bindings" ON)
option(AARE_TESTS "Build tests" ON)
option(AARE_EXAMPLES "Build examples" ON)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
# General options
option(AARE_PYTHON_BINDINGS "Build python bindings" OFF)
option(AARE_TESTS "Build tests" OFF)
option(AARE_BENCHMARKS "Build benchmarks" OFF)
option(AARE_EXAMPLES "Build examples" OFF)
option(AARE_IN_GITHUB_ACTIONS "Running in Github Actions" OFF)
option(AARE_DOCS "Build documentation" OFF)
option(AARE_VERBOSE "Verbose output" OFF)
option(AARE_CUSTOM_ASSERT "Use custom assert" OFF)
option(AARE_INSTALL_PYTHONEXT "Install the python extension in the install tree under CMAKE_INSTALL_PREFIX/aare/" OFF)
option(AARE_HDF5 "Hdf5 File Format" OFF)
option(AARE_ASAN "Enable AddressSanitizer" OFF)
# Configure which of the dependencies to use FetchContent for
option(AARE_FETCH_FMT "Use FetchContent to download fmt" ON)
option(AARE_FETCH_PYBIND11 "Use FetchContent to download pybind11" ON)
option(AARE_FETCH_CATCH "Use FetchContent to download catch2" ON)
option(AARE_FETCH_JSON "Use FetchContent to download nlohmann::json" ON)
option(AARE_FETCH_ZMQ "Use FetchContent to download libzmq" ON)
option(ENABLE_DRAFTS "Enable zmq drafts (depends on gnutls or nss)" OFF)
option(AARE_FETCH_LMFIT "Use FetchContent to download lmfit" ON)
#Convenience option to use system libraries
#Convenience option to use system libraries only (no FetchContent)
option(AARE_SYSTEM_LIBRARIES "Use system libraries" OFF)
if(AARE_SYSTEM_LIBRARIES)
message(STATUS "Build using system libraries")
@ -44,19 +74,100 @@ if(AARE_SYSTEM_LIBRARIES)
set(AARE_FETCH_CATCH OFF CACHE BOOL "Disabled FetchContent for catch2" FORCE)
set(AARE_FETCH_JSON OFF CACHE BOOL "Disabled FetchContent for nlohmann::json" FORCE)
set(AARE_FETCH_ZMQ OFF CACHE BOOL "Disabled FetchContent for libzmq" FORCE)
# Still fetch lmfit when setting AARE_SYSTEM_LIBRARIES since this is not available
# on conda-forge
endif()
if(AARE_VERBOSE)
add_compile_definitions(AARE_VERBOSE)
add_compile_definitions(AARE_LOG_LEVEL=aare::logDEBUG5)
else()
add_compile_definitions(AARE_LOG_LEVEL=aare::logINFOBLUE)
endif()
if(AARE_CUSTOM_ASSERT)
add_compile_definitions(AARE_CUSTOM_ASSERT)
endif()
if(AARE_BENCHMARKS)
add_subdirectory(benchmarks)
endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(AARE_FETCH_ZMQ)
if(AARE_FETCH_LMFIT)
#TODO! Should we fetch lmfit from the web or inlcude a tar.gz in the repo?
set(LMFIT_PATCH_COMMAND git apply ${CMAKE_CURRENT_SOURCE_DIR}/patches/lmfit.patch)
# For cmake < 3.28 we can't supply EXCLUDE_FROM_ALL to FetchContent_Declare
# so we need this workaround
if (${CMAKE_VERSION} VERSION_LESS "3.28")
FetchContent_Declare(
lmfit
GIT_REPOSITORY https://jugit.fz-juelich.de/mlz/lmfit.git
GIT_TAG main
PATCH_COMMAND ${LMFIT_PATCH_COMMAND}
UPDATE_DISCONNECTED 1
)
else()
FetchContent_Declare(
lmfit
GIT_REPOSITORY https://jugit.fz-juelich.de/mlz/lmfit.git
GIT_TAG main
PATCH_COMMAND ${LMFIT_PATCH_COMMAND}
UPDATE_DISCONNECTED 1
EXCLUDE_FROM_ALL 1
)
endif()
#Disable what we don't need from lmfit
set(BUILD_TESTING OFF CACHE BOOL "")
set(LMFIT_CPPTEST OFF CACHE BOOL "")
set(LIB_MAN OFF CACHE BOOL "")
set(LMFIT_CPPTEST OFF CACHE BOOL "")
set(BUILD_SHARED_LIBS OFF CACHE BOOL "")
if (${CMAKE_VERSION} VERSION_LESS "3.28")
if(NOT lmfit_POPULATED)
FetchContent_Populate(lmfit)
add_subdirectory(${lmfit_SOURCE_DIR} ${lmfit_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
else()
FetchContent_MakeAvailable(lmfit)
endif()
set_property(TARGET lmfit PROPERTY POSITION_INDEPENDENT_CODE ON)
else()
find_package(lmfit REQUIRED)
endif()
if(AARE_FETCH_ZMQ)
# Fetchcontent_Declare is deprecated need to find a way to update this
# for now setting the policy to old is enough
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.30")
cmake_policy(SET CMP0169 OLD)
endif()
set(ZMQ_PATCH_COMMAND git apply ${CMAKE_CURRENT_SOURCE_DIR}/patches/libzmq_cmake_version.patch)
FetchContent_Declare(
libzmq
GIT_REPOSITORY https://github.com/zeromq/libzmq.git
GIT_TAG v4.3.4
PATCH_COMMAND ${ZMQ_PATCH_COMMAND}
UPDATE_DISCONNECTED 1
)
# Disable unwanted options from libzmq
set(BUILD_TESTS OFF CACHE BOOL "Switch off libzmq test build")
set(BUILD_SHARED OFF CACHE BOOL "Switch off libzmq shared libs")
set(WITH_PERF_TOOL OFF CACHE BOOL "")
set(ENABLE_CPACK OFF CACHE BOOL "")
set(ENABLE_CLANG OFF CACHE BOOL "")
set(ENABLE_CURVE OFF CACHE BOOL "")
set(ENABLE_DRAFTS OFF CACHE BOOL "")
# TODO! Verify that this is what we want to do in aare
# Using GetProperties and Populate to be able to exclude zmq
# from install (not possible with FetchContent_MakeAvailable(libzmq))
@ -65,7 +176,6 @@ if(AARE_FETCH_ZMQ)
FetchContent_Populate(libzmq)
add_subdirectory(${libzmq_SOURCE_DIR} ${libzmq_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
else()
find_package(ZeroMQ 4 REQUIRED)
endif()
@ -80,16 +190,71 @@ if (AARE_FETCH_FMT)
GIT_PROGRESS TRUE
USES_TERMINAL_DOWNLOAD TRUE
)
set(FMT_INSTALL ON CACHE BOOL "")
# set(FMT_CMAKE_DIR "")
FetchContent_MakeAvailable(fmt)
set_property(TARGET fmt PROPERTY POSITION_INDEPENDENT_CODE ON)
install(TARGETS fmt
EXPORT ${project}-targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
else()
find_package(fmt 6 REQUIRED)
endif()
if (AARE_FETCH_JSON)
FetchContent_Declare(
json
URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz
)
set(JSON_Install ON CACHE BOOL "")
FetchContent_MakeAvailable(json)
set(NLOHMANN_JSON_TARGET_NAME nlohmann_json)
install(
TARGETS nlohmann_json
EXPORT "${TARGETS_EXPORT_NAME}"
)
message(STATUS "target: ${NLOHMANN_JSON_TARGET_NAME}")
else()
find_package(nlohmann_json 3.11.3 REQUIRED)
endif()
include(GNUInstallDirs)
# If conda build, always set lib dir to 'lib'
if($ENV{CONDA_BUILD})
set(CMAKE_INSTALL_LIBDIR "lib")
endif()
# Set lower / upper case project names
string(TOUPPER "${PROJECT_NAME}" PROJECT_NAME_UPPER)
string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
# Set targets export name (used by slsDetectorPackage and dependencies)
set(TARGETS_EXPORT_NAME "${PROJECT_NAME_LOWER}-targets")
set(namespace "aare::")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
# Check if project is being used directly or via add_subdirectory
set(AARE_MASTER_PROJECT OFF)
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(AARE_MASTER_PROJECT ON)
endif()
add_library(aare_compiler_flags INTERFACE)
target_compile_features(aare_compiler_flags INTERFACE cxx_std_17)
if(AARE_PYTHON_BINDINGS)
add_subdirectory(python)
endif()
#################
# MSVC specific #
#################
@ -131,69 +296,45 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release")
target_compile_options(aare_compiler_flags INTERFACE -O3)
else()
message(STATUS "Debug build")
target_compile_options(
aare_compiler_flags
INTERFACE
-Og
-ggdb3
# -D_GLIBCXX_DEBUG # causes errors with boost
-D_GLIBCXX_DEBUG_PEDANTIC
endif()
# Common flags for GCC and Clang
target_compile_options(
aare_compiler_flags
INTERFACE
-Wall
-Wextra
-pedantic
-Wshadow
-Wold-style-cast
-Wnon-virtual-dtor
-Woverloaded-virtual
-Wdouble-promotion
-Wformat=2
-Wredundant-decls
-Wvla
-Wdouble-promotion
-Werror=return-type #important can cause segfault in optimzed builds
)
if (NOT AARE_PYTHON_BINDINGS)
target_compile_options(
aare_compiler_flags
INTERFACE
-fdiagnostics-parseable-fixits
# -fdiagnostics-generate-patch
-fdiagnostics-show-template-tree
-fsanitize=address,undefined,pointer-compare
-fno-sanitize-recover
# -D_FORTIFY_SOURCE=2 # not needed for debug builds
# -fstack-protector # cause errors wih folly? (ProducerConsumerQueue.hpp)
-fno-omit-frame-pointer
)
target_link_libraries(
aare_compiler_flags
INTERFACE
-fdiagnostics-parseable-fixits
# -fdiagnostics-generate-patch
-fdiagnostics-show-template-tree
-fsanitize=address,undefined,pointer-compare
-fno-sanitize-recover
# -D_FORTIFY_SOURCE=2
-fno-omit-frame-pointer
)
endif()
endif()
if(AARE_USE_WARNINGS)
target_compile_options(
aare_compiler_flags
INTERFACE
-Wall
-Wextra
-pedantic
-Wshadow
-Wnon-virtual-dtor
-Woverloaded-virtual
-Wdouble-promotion
-Wformat=2
-Wredundant-decls
-Wvla
-Wdouble-promotion
-Werror=return-type #important can cause segfault in optimzed builds
)
endif()
endif() #GCC/Clang specific
if(AARE_ASAN)
message(STATUS "AddressSanitizer enabled")
target_compile_options(
aare_compiler_flags
INTERFACE
-fsanitize=address,undefined,pointer-compare
-fno-omit-frame-pointer
)
target_link_libraries(
aare_compiler_flags
INTERFACE
-fsanitize=address,undefined,pointer-compare
-fno-omit-frame-pointer
)
endif()
@ -204,22 +345,201 @@ if(AARE_TESTS)
add_subdirectory(tests)
endif()
add_subdirectory(src)
###------------------------------------------------------------------------------MAIN LIBRARY
###------------------------------------------------------------------------------------------
#Overall target to link to when using the library
add_library(aare INTERFACE)
target_link_libraries(aare INTERFACE core file_io utils network_io processing aare_compiler_flags)
target_include_directories(aare INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
set(PUBLICHEADERS
include/aare/ArrayExpr.hpp
include/aare/CalculateEta.hpp
include/aare/Cluster.hpp
include/aare/ClusterFinder.hpp
include/aare/ClusterFile.hpp
include/aare/CtbRawFile.hpp
include/aare/ClusterVector.hpp
include/aare/decode.hpp
include/aare/type_traits.hpp
include/aare/scan_parameters.hpp
include/aare/to_string.hpp
include/aare/string_utils.hpp
include/aare/defs.hpp
include/aare/Dtype.hpp
include/aare/File.hpp
include/aare/Fit.hpp
include/aare/FileInterface.hpp
include/aare/FilePtr.hpp
include/aare/Frame.hpp
include/aare/GainMap.hpp
include/aare/geo_helpers.hpp
include/aare/JungfrauDataFile.hpp
include/aare/logger.hpp
include/aare/NDArray.hpp
include/aare/NDView.hpp
include/aare/NumpyFile.hpp
include/aare/NumpyHelpers.hpp
include/aare/Pedestal.hpp
include/aare/PixelMap.hpp
include/aare/RawFile.hpp
include/aare/RawMasterFile.hpp
include/aare/RawSubFile.hpp
include/aare/VarClusterFinder.hpp
include/aare/utils/task.hpp
)
add_subdirectory(examples)
set(SourceFiles
${CMAKE_CURRENT_SOURCE_DIR}/src/CtbRawFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/defs.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/to_string.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/string_utils.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Dtype.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/decode.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Frame.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/File.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/FilePtr.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Fit.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/geo_helpers.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/JungfrauDataFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/NumpyFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/NumpyHelpers.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Interpolator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/PixelMap.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/RawFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/RawSubFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/RawMasterFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/task.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/ifstream_helpers.cpp
)
# HDF5
if (AARE_HDF5)
find_package(HDF5 1.10 COMPONENTS CXX REQUIRED)
add_definitions(
${HDF5_DEFINITIONS}
)
list (APPEND PUBLICHEADERS
include/aare/Hdf5File.hpp
include/aare/Hdf5MasterFile.hpp
)
list (APPEND SourceFiles
${CMAKE_CURRENT_SOURCE_DIR}/src/Hdf5File.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Hdf5MasterFile.cpp
)
endif (AARE_HDF5)
add_library(aare_core STATIC ${SourceFiles})
target_include_directories(aare_core PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(
aare_core
PUBLIC
fmt::fmt
nlohmann_json::nlohmann_json
${STD_FS_LIB} # from helpers.cmake
PRIVATE
aare_compiler_flags
Threads::Threads
$<BUILD_INTERFACE:lmfit>
)
if (AARE_HDF5 AND HDF5_FOUND)
add_definitions(-DHDF5_FOUND)
target_link_libraries(aare_core PUBLIC
${HDF5_LIBRARIES}
)
target_include_directories(aare_core PUBLIC
${HDF5_INCLUDE_DIRS}
)
endif()
set_target_properties(aare_core PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
PUBLIC_HEADER "${PUBLICHEADERS}"
)
if (AARE_PYTHON_BINDINGS)
set_property(TARGET aare_core PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
if(AARE_TESTS)
set(TestSources
${CMAKE_CURRENT_SOURCE_DIR}/src/algorithm.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/defs.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/to_string.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/scan_parameters.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/decode.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Dtype.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Frame.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/geo_helpers.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/RawMasterFile.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/NDArray.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/NDView.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/ClusterFinder.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/ClusterVector.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Cluster.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/CalculateEta.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/ClusterFile.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/ClusterFinderMT.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Pedestal.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/JungfrauDataFile.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/NumpyFile.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/NumpyHelpers.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/RawFile.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/RawSubFile.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/task.test.cpp
)
if(HDF5_FOUND)
list (APPEND TestSources
${CMAKE_CURRENT_SOURCE_DIR}/src/Hdf5MasterFile.test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Hdf5File.test.cpp
)
endif()
target_sources(tests PRIVATE ${TestSources} )
endif()
###------------------------------------------------------------------------------------------
###------------------------------------------------------------------------------------------
if(AARE_MASTER_PROJECT)
install(TARGETS aare_core aare_compiler_flags
EXPORT "${TARGETS_EXPORT_NAME}"
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/aare
)
endif()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_INSTALL_RPATH $ORIGIN)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
# #Overall target to link to when using the library
# add_library(aare INTERFACE)
# target_link_libraries(aare INTERFACE aare_core aare_compiler_flags)
# target_include_directories(aare INTERFACE
# $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
# $<INSTALL_INTERFACE:include>
# )
# add_subdirectory(examples)
if(AARE_DOCS)
add_subdirectory(docs)
endif()
# custom target to run check formatting with clang-format
add_custom_target(
check-format
@ -247,9 +567,14 @@ endif()
add_custom_target(
clang-tidy
COMMAND find \( -path "./src/*" -a -not -path "./src/python/*" -a \( -name "*.cpp" -not -name "*.test.cpp"\) \) -not -name "CircularFifo.hpp" -not -name "ProducerConsumerQueue.hpp" -not -name "VariableSizeClusterFinder.hpp" | xargs -I {} -n 1 -P 10 bash -c "${CLANG_TIDY_COMMAND} --config-file=.clang-tidy -p build {}"
COMMAND find \( -path "./src/*" -a -not -path "./src/python/*" -a \( -name "*.cpp" -not -name "*.test.cpp" \) \) -not -name "CircularFifo.hpp" -not -name "ProducerConsumerQueue.hpp" -not -name "VariableSizeClusterFinder.hpp" | xargs -I {} -n 1 -P 10 bash -c "${CLANG_TIDY_COMMAND} --config-file=.clang-tidy -p build {}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "linting with clang-tidy"
VERBATIM
)
if(AARE_MASTER_PROJECT)
set(CMAKE_INSTALL_DIR "share/cmake/${PROJECT_NAME}")
set(PROJECT_LIBRARIES aare-core aare-compiler-flags )
include(cmake/package_config.cmake)
endif()

17
COPYING
View File

@ -1,17 +0,0 @@
The Aare Package is provided under:
SPDX-License-Identifier: LGPL-3.0-or-later
Being under the terms of the GNU Lesser General Public License version 3 or later,
according with:
LICENSES/LGPL-3.0
Source code under the Apache 2.0 License have the SPDX Identifier and are
according with:
LICENSES/ThirdParty/Apache-2.0
All contributions to the Aare Package are subject to this COPYING file.

View File

@ -1,688 +0,0 @@
Valid-License-Identifier: GPL-3.0
Valid-License-Identifier: GPL-3.0+
SPDX-URL: https://spdx.org/licenses/GPL-3.0-or-later.html
Usage-Guide:
To use this license in source code, put one of the following SPDX
tag/value pairs into a comment according to the placement
guidelines in the licensing rules documentation.
For 'GNU Library General Public License (LGPL) version 3.0 only' use:
SPDX-License-Identifier: GPL-3.0
For 'GNU Library General Public License (LGPL) version 3.0 or any later
version' use:
SPDX-License-Identifier: GPL-3.0-or-later
License-Text:
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -1,179 +0,0 @@
Valid-License-Identifier: LGPL-3.0
Valid-License-Identifier: LGPL-3.0+
SPDX-URL: https://spdx.org/licenses/LGPL-3.0-or-later.html
Usage-Guide:
To use this license in source code, put one of the following SPDX
tag/value pairs into a comment according to the placement
guidelines in the licensing rules documentation.
For 'GNU Library General Public License (LGPL) version 3.0 only' use:
SPDX-License-Identifier: LGPL-3.0
For 'GNU Library General Public License (LGPL) version 3.0 or any later
version' use:
SPDX-License-Identifier: LGPL-3.0-or-later
License-Text:
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View File

@ -1,210 +0,0 @@
Valid-License-Identifier: Apache-2.0
SPDX-URL: https://spdx.org/licenses/Apache-2.0.html
Usage-Guide:
To use this license in source code, put one of the following SPDX
tag/value pairs into a comment according to the placement
guidelines in the licensing rules documentation.
SPDX-License-Identifier: Apache-2.0
License-Text:
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

104
README.md
View File

@ -2,76 +2,70 @@
Data analysis library for PSI hybrid detectors
## Build and install
Prerequisites
- cmake >= 3.14
- C++17 compiler (gcc >= 8)
- python >= 3.10
## Folder structure
| Folder | subfolder | Content |
|----------|---------------|-------------------------------------|
| include/ | aare/ | top level header/s |
| core/ | include/ | public headers for core |
| | src/ | source files and non public headers |
## file_io class diagram
![file_io class diagram](./extra/uml/out/file_io/ClassDiagram.png)
## Test the zmq socket with a detector simulator
**1. Download and build the slsDetectorPackage**
### Development install (for Python)
```bash
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch=8.0.1 #or the desired branch
cd slsDetectorPackage
mkdir build && cd build
cmake .. -DSLS_USE_SIMULATOR=ON
make -j8 #or your number of cores
git clone git@github.com:slsdetectorgroup/aare.git --branch=v1 #or using http...
mkdir build
cd build
#configure using cmake
cmake ../aare
#build (replace 4 with the number of threads you want to use)
make -j4
```
**2. Launch the slsReceiver**
```bash
bin/slsReceiver
Now you can use the Python module from your build directory
```python
import aare
f = aare.File('Some/File/I/Want_to_open_master_0.json')
```
**3. Launch the virtual server**
To run form other folders either add the path to your conda environment using conda-build or add it to your PYTHONPATH
### Install using conda/mamba
```bash
bin/jungfrauDetectorServer_virtual
#enable your env first!
conda install aare=2024.10.29.dev0 -c slsdetectorgroup
```
**4 Configure the detector simulator**
### Install to a custom location and use in your project
Working example in: https://github.com/slsdetectorgroup/aare-examples
```bash
#sample config file is in etc/ in the aare repo
sls_detector_put config etc/virtual_jf.config
#build and install aare
git clone git@github.com:slsdetectorgroup/aare.git --branch=v1 #or using http...
mkdir build
cd build
#Now you can take images using sls_detector_acquire
sls_detector_acquire
#configure using cmake
cmake ../aare -DCMAKE_INSTALL_PREFIX=/where/to/put/aare
#build (replace 4 with the number of threads you want to use)
make -j4
#install
make install
#Now configure your project
cmake .. -DCMAKE_PREFIX_PATH=SOME_PATH
```
**5. Run the zmq example**
### Local build of conda pkgs
```bash
examples/zmq_example
#Will print the headers fof the frames received
```
## Test the zmq processing replaying data
To be implemented
## generate documentation
```bash
# for doxygen documentation
doxygen .doxygen.config
# for automatically generated plant uml diagrams
clang-uml
conda build . --variants="{python: [3.11, 3.12, 3.13]}"
```

22
RELEASE.md Normal file
View File

@ -0,0 +1,22 @@
# Release notes
### head
Features:
- Cluster finder now works with 5x5, 7x7 and 9x9 clusters
### 2025.05.22
Features:
- Added scurve fitting
Bugfixes:
- Fixed crash when opening raw files with large number of data files

1
VERSION Normal file
View File

@ -0,0 +1 @@
2025.5.22

View File

@ -1,10 +0,0 @@
name: aare
channels:
- conda-forge
- defaults
dependencies:
- fmt
- pybind11
- nlohmann_json # should be removed
- catch2
- zeromq

27
benchmarks/CMakeLists.txt Normal file
View File

@ -0,0 +1,27 @@
include(FetchContent)
FetchContent_Declare(
benchmark
GIT_REPOSITORY https://github.com/google/benchmark.git
GIT_TAG v1.8.3 # Change to the latest version if needed
)
# Ensure Google Benchmark is built correctly
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(benchmark)
add_executable(benchmarks)
target_sources(benchmarks PRIVATE ndarray_benchmark.cpp calculateeta_benchmark.cpp)
# Link Google Benchmark and other necessary libraries
target_link_libraries(benchmarks PRIVATE benchmark::benchmark aare_core aare_compiler_flags)
# Set output properties
set_target_properties(benchmarks PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
OUTPUT_NAME run_benchmarks
)

View File

@ -0,0 +1,70 @@
#include "aare/CalculateEta.hpp"
#include "aare/ClusterFile.hpp"
#include <benchmark/benchmark.h>
using namespace aare;
class ClusterFixture : public benchmark::Fixture {
public:
Cluster<int, 2, 2> cluster_2x2{};
Cluster<int, 3, 3> cluster_3x3{};
private:
using benchmark::Fixture::SetUp;
void SetUp([[maybe_unused]] const benchmark::State &state) override {
int temp_data[4] = {1, 2, 3, 1};
std::copy(std::begin(temp_data), std::end(temp_data),
std::begin(cluster_2x2.data));
cluster_2x2.x = 0;
cluster_2x2.y = 0;
int temp_data2[9] = {1, 2, 3, 1, 3, 4, 5, 1, 20};
std::copy(std::begin(temp_data2), std::end(temp_data2),
std::begin(cluster_3x3.data));
cluster_3x3.x = 0;
cluster_3x3.y = 0;
}
// void TearDown(::benchmark::State& state) {
// }
};
BENCHMARK_F(ClusterFixture, Calculate2x2Eta)(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
Eta2 eta = calculate_eta2(cluster_2x2);
benchmark::DoNotOptimize(eta);
}
}
// almost takes double the time
BENCHMARK_F(ClusterFixture, CalculateGeneralEtaFor2x2Cluster)
(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
Eta2 eta = calculate_eta2<int, 2, 2>(cluster_2x2);
benchmark::DoNotOptimize(eta);
}
}
BENCHMARK_F(ClusterFixture, Calculate3x3Eta)(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
Eta2 eta = calculate_eta2(cluster_3x3);
benchmark::DoNotOptimize(eta);
}
}
// almost takes double the time
BENCHMARK_F(ClusterFixture, CalculateGeneralEtaFor3x3Cluster)
(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
Eta2 eta = calculate_eta2<int, 3, 3>(cluster_3x3);
benchmark::DoNotOptimize(eta);
}
}
// BENCHMARK_MAIN();

View File

@ -0,0 +1,132 @@
#include "aare/NDArray.hpp"
#include <benchmark/benchmark.h>
using aare::NDArray;
constexpr ssize_t size = 1024;
class TwoArrays : public benchmark::Fixture {
public:
NDArray<int, 2> a{{size, size}, 0};
NDArray<int, 2> b{{size, size}, 0};
void SetUp(::benchmark::State &state) {
for (uint32_t i = 0; i < size; i++) {
for (uint32_t j = 0; j < size; j++) {
a(i, j) = i * j + 1;
b(i, j) = i * j + 1;
}
}
}
// void TearDown(::benchmark::State& state) {
// }
};
BENCHMARK_F(TwoArrays, AddWithOperator)(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
NDArray<int, 2> res = a + b;
benchmark::DoNotOptimize(res);
}
}
BENCHMARK_F(TwoArrays, AddWithIndex)(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
NDArray<int, 2> res(a.shape());
for (uint32_t i = 0; i < a.size(); i++) {
res(i) = a(i) + b(i);
}
benchmark::DoNotOptimize(res);
}
}
BENCHMARK_F(TwoArrays, SubtractWithOperator)(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
NDArray<int, 2> res = a - b;
benchmark::DoNotOptimize(res);
}
}
BENCHMARK_F(TwoArrays, SubtractWithIndex)(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
NDArray<int, 2> res(a.shape());
for (uint32_t i = 0; i < a.size(); i++) {
res(i) = a(i) - b(i);
}
benchmark::DoNotOptimize(res);
}
}
BENCHMARK_F(TwoArrays, MultiplyWithOperator)(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
NDArray<int, 2> res = a * b;
benchmark::DoNotOptimize(res);
}
}
BENCHMARK_F(TwoArrays, MultiplyWithIndex)(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
NDArray<int, 2> res(a.shape());
for (uint32_t i = 0; i < a.size(); i++) {
res(i) = a(i) * b(i);
}
benchmark::DoNotOptimize(res);
}
}
BENCHMARK_F(TwoArrays, DivideWithOperator)(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
NDArray<int, 2> res = a / b;
benchmark::DoNotOptimize(res);
}
}
BENCHMARK_F(TwoArrays, DivideWithIndex)(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
NDArray<int, 2> res(a.shape());
for (uint32_t i = 0; i < a.size(); i++) {
res(i) = a(i) / b(i);
}
benchmark::DoNotOptimize(res);
}
}
BENCHMARK_F(TwoArrays, FourAddWithOperator)(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
NDArray<int, 2> res = a + b + a + b;
benchmark::DoNotOptimize(res);
}
}
BENCHMARK_F(TwoArrays, FourAddWithIndex)(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
NDArray<int, 2> res(a.shape());
for (uint32_t i = 0; i < a.size(); i++) {
res(i) = a(i) + b(i) + a(i) + b(i);
}
benchmark::DoNotOptimize(res);
}
}
BENCHMARK_F(TwoArrays, MultiplyAddDivideWithOperator)(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
NDArray<int, 2> res = a * a + b / a;
benchmark::DoNotOptimize(res);
}
}
BENCHMARK_F(TwoArrays, MultiplyAddDivideWithIndex)(benchmark::State &st) {
for (auto _ : st) {
// This code gets timed
NDArray<int, 2> res(a.shape());
for (uint32_t i = 0; i < a.size(); i++) {
res(i) = a(i) * a(i) + b(i) / a(i);
}
benchmark::DoNotOptimize(res);
}
}
BENCHMARK_MAIN();

1
cmake/.gitignore vendored
View File

@ -1 +0,0 @@

11
cmake/FindSphinx.cmake Normal file
View File

@ -0,0 +1,11 @@
#Look for an executable called sphinx-build
find_program(SPHINX_EXECUTABLE
NAMES sphinx-build sphinx-build-3.6
DOC "Path to sphinx-build executable")
include(FindPackageHandleStandardArgs)
#Handle standard arguments to find_package like REQUIRED and QUIET
find_package_handle_standard_args(Sphinx
"Failed to find sphinx-build executable"
SPHINX_EXECUTABLE)

View File

@ -4,3 +4,43 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE ${val} CACHE STRING "Build type (default ${val})" FORCE)
endif()
endfunction()
function(set_std_fs_lib)
# from pybind11
# Check if we need to add -lstdc++fs or -lc++fs or nothing
if(DEFINED CMAKE_CXX_STANDARD AND CMAKE_CXX_STANDARD LESS 17)
set(STD_FS_NO_LIB_NEEDED TRUE)
elseif(MSVC)
set(STD_FS_NO_LIB_NEEDED TRUE)
else()
file(
WRITE ${CMAKE_CURRENT_BINARY_DIR}/main.cpp
"#include <filesystem>\nint main(int argc, char ** argv) {\n std::filesystem::path p(argv[0]);\n return p.string().length();\n}"
)
try_compile(
STD_FS_NO_LIB_NEEDED ${CMAKE_CURRENT_BINARY_DIR}
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/main.cpp
COMPILE_DEFINITIONS -std=c++17)
try_compile(
STD_FS_NEEDS_STDCXXFS ${CMAKE_CURRENT_BINARY_DIR}
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/main.cpp
COMPILE_DEFINITIONS -std=c++17
LINK_LIBRARIES stdc++fs)
try_compile(
STD_FS_NEEDS_CXXFS ${CMAKE_CURRENT_BINARY_DIR}
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/main.cpp
COMPILE_DEFINITIONS -std=c++17
LINK_LIBRARIES c++fs)
endif()
if(${STD_FS_NEEDS_STDCXXFS})
set(STD_FS_LIB stdc++fs PARENT_SCOPE)
elseif(${STD_FS_NEEDS_CXXFS})
set(STD_FS_LIB c++fs PARENT_SCOPE)
elseif(${STD_FS_NO_LIB_NEEDED})
set(STD_FS_LIB "" PARENT_SCOPE)
else()
message(WARNING "Unknown C++17 compiler - not passing -lstdc++fs")
set(STD_FS_LIB "")
endif()
endfunction()

View File

@ -0,0 +1,35 @@
# This cmake code creates the configuration that is found and used by
# find_package() of another cmake project
# get lower and upper case project name for the configuration files
# configure and install the configuration files
include(CMakePackageConfigHelpers)
configure_package_config_file(
"${CMAKE_SOURCE_DIR}/cmake/project-config.cmake.in"
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME_LOWER}
PATH_VARS CMAKE_INSTALL_DIR)
write_basic_package_version_file(
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion
)
install(FILES
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config.cmake"
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake"
COMPONENT devel
DESTINATION ${CMAKE_INSTALL_DIR}
)
if (PROJECT_LIBRARIES OR PROJECT_STATIC_LIBRARIES)
install(
EXPORT "${TARGETS_EXPORT_NAME}"
FILE ${PROJECT_NAME_LOWER}-targets.cmake
DESTINATION ${CMAKE_INSTALL_DIR}
)
endif ()

View File

@ -0,0 +1,28 @@
# Config file for @PROJECT_NAME_LOWER@
#
# It defines the following variables:
#
# @PROJECT_NAME_UPPER@_INCLUDE_DIRS - include directory
# @PROJECT_NAME_UPPER@_LIBRARIES - all dynamic libraries
# @PROJECT_NAME_UPPER@_STATIC_LIBRARIES - all static libraries
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
set(SLS_USE_HDF5 "@SLS_USE_HDF5@")
# List dependencies
find_dependency(Threads)
find_dependency(fmt)
find_dependency(nlohmann_json)
# Add optional dependencies here
if (SLS_USE_HDF5)
find_dependency(HDF5)
endif ()
set_and_check(@PROJECT_NAME_UPPER@_CMAKE_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_DIR@")
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
check_required_components("@PROJECT_NAME@")

View File

@ -0,0 +1,5 @@
python:
- 3.11
- 3.12
- 3.13

50
conda-recipe/meta.yaml Normal file
View File

@ -0,0 +1,50 @@
source:
path: ../
{% set version = load_file_regex(load_file = 'VERSION', regex_pattern = '(\d+(?:\.\d+)*(?:[\+\w\.]+))').group(1) %}
package:
name: aare
version: {{version}}
source:
path: ..
build:
number: 0
script:
- unset CMAKE_GENERATOR && {{ PYTHON }} -m pip install . -vv
requirements:
build:
- {{ compiler('cxx') }}
- cmake
- ninja
host:
- python
- pip
- numpy=2.1
- scikit-build-core
- pybind11 >=2.13.0
- matplotlib # needed in host to solve the environment for run
run:
- python
- {{ pin_compatible('numpy') }}
- matplotlib
test:
imports:
- aare
requires:
- pytest
- boost-histogram
source_files:
- python/tests
commands:
- python -m pytest python/tests
about:
summary: Data analysis library for hybrid pixel detectors from PSI

Binary file not shown.

View File

@ -1,53 +0,0 @@
{
"Version": 7.2,
"Timestamp": "Tue Mar 26 17:24:02 2024",
"Detector Type": "Eiger",
"Timing Mode": "auto",
"Geometry": {
"x": 2,
"y": 2
},
"Image Size in bytes": 262144,
"Pixels": {
"x": 512,
"y": 256
},
"Max Frames Per File": 10000,
"Frame Discard Policy": "nodiscard",
"Frame Padding": 1,
"Scan Parameters": "[disabled]",
"Total Frames": 3,
"Receiver Roi": {
"xmin": 4294967295,
"xmax": 4294967295,
"ymin": 4294967295,
"ymax": 4294967295
},
"Dynamic Range": 16,
"Ten Giga": 0,
"Exptime": "5s",
"Period": "1s",
"Threshold Energy": -1,
"Sub Exptime": "2.62144ms",
"Sub Period": "2.62144ms",
"Quad": 0,
"Number of rows": 256,
"Rate Corrections": "[0, 0]",
"Frames in File": 3,
"Frame Header Format": {
"Frame Number": "8 bytes",
"SubFrame Number/ExpLength": "4 bytes",
"Packet Number": "4 bytes",
"Bunch ID": "8 bytes",
"Timestamp": "8 bytes",
"Module Id": "2 bytes",
"Row": "2 bytes",
"Column": "2 bytes",
"Reserved": "2 bytes",
"Debug": "4 bytes",
"Round Robin Number": "2 bytes",
"Detector Type": "1 byte",
"Header Version": "1 byte",
"Packets Caught Mask": "64 bytes"
}
}

View File

@ -1,53 +0,0 @@
{
"Version": 7.2,
"Timestamp": "Tue Mar 26 17:24:34 2024",
"Detector Type": "Eiger",
"Timing Mode": "auto",
"Geometry": {
"x": 2,
"y": 2
},
"Image Size in bytes": 524288,
"Pixels": {
"x": 512,
"y": 256
},
"Max Frames Per File": 10000,
"Frame Discard Policy": "nodiscard",
"Frame Padding": 1,
"Scan Parameters": "[disabled]",
"Total Frames": 3,
"Receiver Roi": {
"xmin": 4294967295,
"xmax": 4294967295,
"ymin": 4294967295,
"ymax": 4294967295
},
"Dynamic Range": 32,
"Ten Giga": 0,
"Exptime": "5s",
"Period": "1s",
"Threshold Energy": -1,
"Sub Exptime": "2.62144ms",
"Sub Period": "2.62144ms",
"Quad": 0,
"Number of rows": 256,
"Rate Corrections": "[0, 0]",
"Frames in File": 3,
"Frame Header Format": {
"Frame Number": "8 bytes",
"SubFrame Number/ExpLength": "4 bytes",
"Packet Number": "4 bytes",
"Bunch ID": "8 bytes",
"Timestamp": "8 bytes",
"Module Id": "2 bytes",
"Row": "2 bytes",
"Column": "2 bytes",
"Reserved": "2 bytes",
"Debug": "4 bytes",
"Round Robin Number": "2 bytes",
"Detector Type": "1 byte",
"Header Version": "1 byte",
"Packets Caught Mask": "64 bytes"
}
}

View File

@ -1,47 +0,0 @@
{
"Version": 7.2,
"Timestamp": "Tue Feb 20 08:29:19 2024",
"Detector Type": "Jungfrau",
"Timing Mode": "auto",
"Geometry": {
"x": 1,
"y": 2
},
"Image Size in bytes": 524288,
"Pixels": {
"x": 1024,
"y": 256
},
"Max Frames Per File": 3,
"Frame Discard Policy": "nodiscard",
"Frame Padding": 1,
"Scan Parameters": "[disabled]",
"Total Frames": 10,
"Receiver Roi": {
"xmin": 4294967295,
"xmax": 4294967295,
"ymin": 4294967295,
"ymax": 4294967295
},
"Exptime": "10us",
"Period": "1ms",
"Number of UDP Interfaces": 2,
"Number of rows": 512,
"Frames in File": 10,
"Frame Header Format": {
"Frame Number": "8 bytes",
"SubFrame Number/ExpLength": "4 bytes",
"Packet Number": "4 bytes",
"Bunch ID": "8 bytes",
"Timestamp": "8 bytes",
"Module Id": "2 bytes",
"Row": "2 bytes",
"Column": "2 bytes",
"Reserved": "2 bytes",
"Debug": "4 bytes",
"Round Robin Number": "2 bytes",
"Detector Type": "1 byte",
"Header Version": "1 byte",
"Packets Caught Mask": "64 bytes"
}
}

Binary file not shown.

View File

@ -1,47 +0,0 @@
{
"Version": 7.2,
"Timestamp": "Tue Feb 20 08:28:24 2024",
"Detector Type": "Jungfrau",
"Timing Mode": "auto",
"Geometry": {
"x": 1,
"y": 1
},
"Image Size in bytes": 1048576,
"Pixels": {
"x": 1024,
"y": 512
},
"Max Frames Per File": 3,
"Frame Discard Policy": "nodiscard",
"Frame Padding": 1,
"Scan Parameters": "[disabled]",
"Total Frames": 10,
"Receiver Roi": {
"xmin": 4294967295,
"xmax": 4294967295,
"ymin": 4294967295,
"ymax": 4294967295
},
"Exptime": "10us",
"Period": "1ms",
"Number of UDP Interfaces": 1,
"Number of rows": 512,
"Frames in File": 10,
"Frame Header Format": {
"Frame Number": "8 bytes",
"SubFrame Number/ExpLength": "4 bytes",
"Packet Number": "4 bytes",
"Bunch ID": "8 bytes",
"Timestamp": "8 bytes",
"Module Id": "2 bytes",
"Row": "2 bytes",
"Column": "2 bytes",
"Reserved": "2 bytes",
"Debug": "4 bytes",
"Round Robin Number": "2 bytes",
"Detector Type": "1 byte",
"Header Version": "1 byte",
"Packets Caught Mask": "64 bytes"
}
}

View File

@ -1,50 +0,0 @@
import numpy as np
import matplotlib.pyplot as plt
plt.ion()
header_dt = np.dtype(
[
("Frame Number", "u8"),
("SubFrame Number/ExpLength", "u4"),
("Packet Number", "u4"),
("Bunch ID", "u8"),
("Timestamp", "u8"),
("Module Id", "u2"),
("Row", "u2"),
("Column", "u2"),
("Reserved", "u2"),
("Debug", "u4"),
("Round Robin Number", "u2"),
("Detector Type", "u1"),
("Header Version", "u1"),
("Packets caught mask", "8u8")
]
)
# Read three frames from a jungfrau file with a single interface
rows = 1024
cols = 512
frames = 1
data = np.zeros((frames,rows,cols), dtype = np.uint16)
header = np.zeros(frames, dtype = header_dt)
for frame in range(frames):
file_name = '/tmp/raw_example_writing_master_'
print("Reading file:", file_name)
with open(file_name) as f:
for i in range(3 if file_id != 3 else 1):
header[i+file_id*3] = np.fromfile(f, dtype=header_dt, count = 1)
data[i+file_id*3] = np.fromfile(f, dtype=np.uint16,count = rows*cols).reshape(rows,cols)
# for i in range(frames if file_id != 3 else 1 ):
# print("frame:",i)
# print(header[i][0,0],data[i][0,1],data[i][1,0],data[i][rows-1,cols-1])
# print("")
print(header[1]["Frame Number"])
#fig, ax = plt.subplots()
#im = ax.imshow(data[0])
#im.set_clim(2000,4000)

View File

@ -1,87 +0,0 @@
import numpy as np
header_dt = np.dtype(
[
("Frame Number", "u8"),
("SubFrame Number/ExpLength", "u4"),
("Packet Number", "u4"),
("Bunch ID", "u8"),
("Timestamp", "u8"),
("Module Id", "u2"),
("Row", "u2"),
("Column", "u2"),
("Reserved", "u2"),
("Debug", "u4"),
("Round Robin Number", "u2"),
("Detector Type", "u1"),
("Header Version", "u1"),
("Packets caught mask", "8u8")
]
)
# Read three frames from a jungfrau file with a single interface
frames = 10
parts = 2
frame_per_file = 3
bytes_per_pixel = 2
frame_cols = 1024
frame_rows = 512
part_cols = 1024
part_rows = 256
parts_data = np.zeros((frames,parts,part_rows,part_cols), dtype = np.uint16)
data = np.zeros((frames,frame_rows,frame_cols), dtype = np.uint16)
header = np.zeros((frames,parts), dtype = header_dt)
# verify that all parts have the same frame number
for frame in range(frames):
for part in range(parts):
file_name = f'jungfrau_double_d{part}_f{frame//frame_per_file}_{0}.raw'
with open(file_name) as f:
offset = (frame%frame_per_file)*(header_dt.itemsize+part_rows*part_cols*bytes_per_pixel)
# print(f"Reading file: {file_name} at offset {offset}")
header[frame,part] = np.fromfile(f, dtype=header_dt, count = 1,offset=offset)
# print(f"Frame {frame} part {part} frame number: {header[frame,part]['Frame Number']}")
if part > 0:
assert header[frame,part]['Frame Number'] == header[frame,0]['Frame Number']
print("[X] All parts have the same frame number\n")
for frame in range(frames):
for part in range(parts):
file_name = f'jungfrau_double_d{part}_f{frame//frame_per_file}_{0}.raw'
# print("Reading file:", file_name)
with open(file_name) as f:
offset = (frame%frame_per_file)*(header_dt.itemsize+part_rows*part_cols*bytes_per_pixel)
header[frame,part] = np.fromfile(f, dtype=header_dt, count = 1, offset=offset)
parts_data[frame,part] = np.fromfile(f, dtype=np.uint16,count = part_rows*part_cols).reshape(part_rows,part_cols)
data[frame] = np.concatenate((parts_data[frame,0],parts_data[frame,1]),axis=0)
pixel_0_0,pixel_0_1,pixel_1_0,pixel_255_1023,pixel_511_1023,= [],[],[],[],[]
for frame in range(frames):
pixel_0_0.append(data[frame,0,0])
pixel_0_1.append(data[frame,0,1])
pixel_1_0.append(data[frame,1,0])
pixel_255_1023.append(data[frame,255,1023])
pixel_511_1023.append(data[frame,511,1023])
print("upper left corner of each frame (pixel_0_0)")
print(pixel_0_0)
print("first pixel on new line of each frame (pixel_1_0)")
print(pixel_1_0)
print("second pixel of the first line of each frame (pixel_0_1)")
print(pixel_0_1)
print("first pixel of the second part on the last line of each frame (pixel_255_1023)")
print(pixel_255_1023)
print("lower right corner of each frame (pixel_511_1023)")
print(pixel_511_1023)

View File

@ -1,40 +0,0 @@
Version : 6.4
TimeStamp : Wed Aug 31 09:08:49 2022
Detector Type : ChipTestBoard
Timing Mode : auto
Geometry : [1, 1]
Image Size : 360000 bytes
Pixels : [96, 1]
Max Frames Per File : 20000
Frame Discard Policy : nodiscard
Frame Padding : 1
Scan Parameters : [disabled]
Total Frames : 100
Exptime : 100us
Period : 4ms
Ten Giga : 1
ADC Mask : 0xffffffff
Analog Flag : 1
Analog Samples : 5000
Digital Flag : 1
Digital Samples : 5000
Dbit Offset : 0
Dbit Bitset : 0
Frames in File : 100
#Frame Header
Frame Number : 8 bytes
SubFrame Number/ExpLength : 4 bytes
Packet Number : 4 bytes
Bunch ID : 8 bytes
Timestamp : 8 bytes
Module Id : 2 bytes
Row : 2 bytes
Column : 2 bytes
Reserved : 2 bytes
Debug : 4 bytes
Round Robin Number : 2 bytes
Detector Type : 1 byte
Header Version : 1 byte
Packets Caught Mask : 64 bytes

View File

@ -1,40 +0,0 @@
Version : 6.2
TimeStamp : Mon Sep 14 16:21:09 2020
Detector Type : Mythen3
Timing Mode : auto
Geometry : [4, 1]
Image Size : 5120 bytes
Pixels : [1280, 1]
Max Frames Per File : 10000
Frame Discard Policy : nodiscard
Frame Padding : 1
Scan Parameters : [disabled]
Total Frames : 1
Dynamic Range : 32
Ten Giga : 1
Period : 0ns
Counter Mask : 0x1
Exptime1 : 0.2s
Exptime2 : 0.2s
Exptime3 : 0.2s
GateDelay1 : 0.1s
GateDelay2 : 0.1s
GateDelay3 : 0.1s
Gates : 1
#Frame Header
Frame Number : 8 bytes
SubFrame Number/ExpLength : 4 bytes
Packet Number : 4 bytes
Bunch ID : 8 bytes
Timestamp : 8 bytes
Module Id : 2 bytes
Row : 2 bytes
Column : 2 bytes
Reserved : 2 bytes
Debug : 4 bytes
Round Robin Number : 2 bytes
Detector Type : 1 byte
Header Version : 1 byte
Packets Caught Mask : 64 bytes

View File

@ -1,58 +0,0 @@
import numpy as np
import shutil
header_dt = np.dtype(
[
("Frame Number", "u8"),
("SubFrame Number/ExpLength", "u4"),
("Packet Number", "u4"),
("Bunch ID", "u8"),
("Timestamp", "u8"),
("Module Id", "u2"),
("Row", "u2"),
("Column", "u2"),
("Reserved", "u2"),
("Debug", "u4"),
("Round Robin Number", "u2"),
("Detector Type", "u1"),
("Header Version", "u1"),
("Packets caught mask", "8u8")
]
)
# Read three frames from a jungfrau file with a single interface
frames = 1
parts = 4
frame_per_file = 3
bytes_per_pixel = 4
frame_cols = 1
frame_rows = 5120
part_cols = 1280
part_rows = 1
header = np.zeros((frames,parts), dtype = header_dt)
# verify that all parts have the same frame number
frame = 0
i = 55
for part in range(parts):
file_name_r = f'scan242_d{part}_f{frame//frame_per_file}_{3}.raw'
file_name_w = f'CORRECTED_scan242_d{part}_f{frame//frame_per_file}_{3}.raw'
shutil.copyfile(file_name_r, file_name_w)
with open(file_name_r) as fr, open(file_name_w, 'r+b') as fw:
# get frame
offset = (frame%frame_per_file)*(header_dt.itemsize+part_rows*part_cols*bytes_per_pixel)
header[frame,part] = np.fromfile(fr, dtype=header_dt, count = 1,offset=offset)
# update frame number
header[frame,part]['Frame Number'] = i
fw.seek(offset)
header[frame,part].tofile(fw)
print("[X] Done\n")

Binary file not shown.

View File

@ -1,55 +0,0 @@
{
"Version": 7.1,
"Timestamp": "Wed Sep 21 13:48:10 2022",
"Detector Type": "Mythen3",
"Timing Mode": "auto",
"Geometry": {
"x": 1,
"y": 1
},
"Image Size in bytes": 15360,
"Pixels": {
"x": 3840,
"y": 1
},
"Max Frames Per File": 10000,
"Frame Discard Policy": "nodiscard",
"Frame Padding": 1,
"Scan Parameters": "[disabled]",
"Total Frames": 1,
"Receiver Roi": {
"xmin": 4294967295,
"xmax": 4294967295,
"ymin": 4294967295,
"ymax": 4294967295
},
"Dynamic Range": 32,
"Ten Giga": 1,
"Period": "2ms",
"Counter Mask": "0x7",
"Exptime1": "0.1s",
"Exptime2": "0.1s",
"Exptime3": "0.1s",
"GateDelay1": "0ns",
"GateDelay2": "0ns",
"GateDelay3": "0ns",
"Gates": 1,
"Threshold Energies": "[-1, -1, -1]",
"Frames in File": 1,
"Frame Header Format": {
"Frame Number": "8 bytes",
"SubFrame Number/ExpLength": "4 bytes",
"Packet Number": "4 bytes",
"Bunch ID": "8 bytes",
"Timestamp": "8 bytes",
"Module Id": "2 bytes",
"Row": "2 bytes",
"Column": "2 bytes",
"Reserved": "2 bytes",
"Debug": "4 bytes",
"Round Robin Number": "2 bytes",
"Detector Type": "1 byte",
"Header Version": "1 byte",
"Packets Caught Mask": "64 bytes"
}
}

View File

@ -1,57 +0,0 @@
import numpy as np
header_dt = np.dtype(
[
("Frame Number", "u8"),
("SubFrame Number/ExpLength", "u4"),
("Packet Number", "u4"),
("Bunch ID", "u8"),
("Timestamp", "u8"),
("Module Id", "u2"),
("Row", "u2"),
("Column", "u2"),
("Reserved", "u2"),
("Debug", "u4"),
("Round Robin Number", "u2"),
("Detector Type", "u1"),
("Header Version", "u1"),
("Packets caught mask", "8u8")
]
)
# Read three frames from a jungfrau file with a single interface
frames = 1
parts = 4
frame_per_file = 3
bytes_per_pixel = 4
frame_cols = 1
frame_rows = 5120
part_cols = 1280
part_rows = 1
header = np.zeros((frames,parts), dtype = header_dt)
# verify that all parts have the same frame number
frame = 0
sync = True
for part in range(parts):
file_name = f'scan242_d{part}_f{frame//frame_per_file}_{3}.raw'
with open(file_name) as f:
offset = (frame%frame_per_file)*(header_dt.itemsize+part_rows*part_cols*bytes_per_pixel)
# print(f"Reading file: {file_name} at offset {offset}")
header[frame,part] = np.fromfile(f, dtype=header_dt, count = 1,offset=offset)
# print(f"Frame {frame} part {part} frame number: {header[frame,part]['Frame Number']}")
print(f"part {part} frame number: {header[frame,part]['Frame Number']}")
sync = sync and (header[frame,part]['Frame Number'] == header[frame,0]['Frame Number'])
if sync:
print("[X] subfiles have the same frame")
else:
print("[X] subfiles do not have the same frame\n")

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,40 +0,0 @@
Version : 6.2
TimeStamp : Mon Sep 14 16:21:09 2020
Detector Type : Mythen3
Timing Mode : auto
Geometry : [4, 1]
Image Size : 5120 bytes
Pixels : [1280, 1]
Max Frames Per File : 10000
Frame Discard Policy : nodiscard
Frame Padding : 1
Scan Parameters : [disabled]
Total Frames : 1
Dynamic Range : 32
Ten Giga : 1
Period : 0ns
Counter Mask : 0x1
Exptime1 : 0.2s
Exptime2 : 0.2s
Exptime3 : 0.2s
GateDelay1 : 0.1s
GateDelay2 : 0.1s
GateDelay3 : 0.1s
Gates : 1
#Frame Header
Frame Number : 8 bytes
SubFrame Number/ExpLength : 4 bytes
Packet Number : 4 bytes
Bunch ID : 8 bytes
Timestamp : 8 bytes
Module Id : 2 bytes
Row : 2 bytes
Column : 2 bytes
Reserved : 2 bytes
Debug : 4 bytes
Round Robin Number : 2 bytes
Detector Type : 1 byte
Header Version : 1 byte
Packets Caught Mask : 64 bytes

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,12 +0,0 @@
import numpy as np
arr = np.arange(10, dtype = np.int32)
np.save('test_1d_int32.npy', arr)
arr2 = np.zeros((3,2,5), dtype = np.float64)
arr2[0,0,0] = 1.0
arr2[0,0,1] = 2.0
arr2[0,1,0] = 72.0
arr2[2,0,4] = 63.0
np.save('test_3d_double.npy', arr2)

View File

@ -1,62 +0,0 @@
###
### Verify that the raw file written by the raw_example.cpp are correct
###
import numpy as np
header_dt = np.dtype(
[
("Frame Number", "u8"),
("SubFrame Number/ExpLength", "u4"),
("Packet Number", "u4"),
("Bunch ID", "u8"),
("Timestamp", "u8"),
("Module Id", "u2"),
("Row", "u2"),
("Column", "u2"),
("Reserved", "u2"),
("Debug", "u4"),
("Round Robin Number", "u2"),
("Detector Type", "u1"),
("Header Version", "u1"),
("Packets caught mask", "8u8")
]
)
frames = 1
parts = 1
frame_per_file = 3
bytes_per_pixel = 2
frame_cols = 512
frame_rows = 1024
part_cols = 512
part_rows = 1024
# parts_data = np.zeros((frames,parts,part_rows,part_cols), dtype = np.uint16)
data = np.zeros((frames,frame_rows,frame_cols), dtype = np.uint16)
header = np.zeros((frames,parts), dtype = header_dt)
# verify that all parts have the same frame number
for frame in range(frames):
for part in range(parts):
file_name = f'/tmp/raw_example_writing_d{part}_f{frame//frame_per_file}_{0}.raw'
with open(file_name) as f:
offset = (frame%frame_per_file)*(header_dt.itemsize+part_rows*part_cols*bytes_per_pixel)
# print(f"Reading file: {file_name} at offset {offset}")
header[frame,part] = np.fromfile(f, dtype=header_dt, count = 1,offset=offset)
# print(f"Frame {frame} part {part} frame number: {header[frame,part]['Frame Number']}")
data[frame] = np.fromfile(f, dtype=np.uint16,count = frame_rows*frame_cols).reshape(frame_rows,frame_cols)
for frame in range(frames):
for i,j in np.ndindex(data[frame].shape):
assert(data[frame][i,j] == i+j)
print("[X] frame data is correct")

55
docs/CMakeLists.txt Normal file
View File

@ -0,0 +1,55 @@
find_package(Doxygen REQUIRED)
find_package(Sphinx REQUIRED)
#Doxygen
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
#Sphinx
set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR})
file(GLOB SPHINX_SOURCE_FILES CONFIGURE_DEPENDS "src/*.rst")
foreach(filename ${SPHINX_SOURCE_FILES})
get_filename_component(fname ${filename} NAME)
message(STATUS "Copying ${filename} to ${SPHINX_BUILD}/src/${fname}")
configure_file(${filename} "${SPHINX_BUILD}/src/${fname}")
endforeach(filename ${SPHINX_SOURCE_FILES})
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in"
"${SPHINX_BUILD}/conf.py"
@ONLY
)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/static/extra.css"
"${SPHINX_BUILD}/static/css/extra.css"
@ONLY
)
add_custom_target(
docs
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
COMMAND ${SPHINX_EXECUTABLE} -a -b html
-Dbreathe_projects.aare=${CMAKE_CURRENT_BINARY_DIR}/xml
-c "${SPHINX_BUILD}"
${SPHINX_BUILD}/src
${SPHINX_BUILD}/html
COMMENT "Generating documentation with Sphinx"
)
add_custom_target(
rst
COMMAND ${SPHINX_EXECUTABLE} -a -b html
-Dbreathe_projects.aare=${CMAKE_CURRENT_BINARY_DIR}/xml
-c "${SPHINX_BUILD}"
${SPHINX_BUILD}/src
${SPHINX_BUILD}/html
COMMENT "Generating documentation with Sphinx"
)

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +0,0 @@
# receive data from two zmqstreams
```bash
killall jungfrauDetectorServer_virtual
jungfrauDetectorServer_virtual
jungfrauDetectorServer_virtual -p 1956
slsMultiReceiver 1980 2 0
sls_detector_put config etc/multimodule_virtual_jf.config
```

63
docs/conf.py.in Normal file
View File

@ -0,0 +1,63 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
print(sys.path)
# -- Project information -----------------------------------------------------
project = 'aare'
copyright = '2024, CPS Detector Group'
author = 'CPS Detector Group'
version = '@PROJECT_VERSION@'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['breathe',
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
]
breathe_default_project = "aare"
napoleon_use_ivar = True
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "furo"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['static']
def setup(app):
app.add_css_file('css/extra.css') # may also be an URL

View File

@ -1,141 +0,0 @@
@startuml
class "NDView<T,ssize_t Ndim=2>" as C_0000853339819629793090
class C_0000853339819629793090 {
__
}
class "NDView<unsigned short,2L>" as C_0000800815410987673815
class C_0000800815410987673815 {
__
}
class "NDView<T,Ndim>" as C_0001549403386232143110
class C_0001549403386232143110 {
__
}
class "NDArray<bool,Ndim>" as C_0000823076622246857026
class C_0000823076622246857026 {
__
}
class "NDArray<V,Ndim>" as C_0002198222861307321825
class C_0002198222861307321825 {
__
}
class "NDArray<T,ssize_t Ndim=2>" as C_0001181947618035129503
class C_0001181947618035129503 {
__
}
class "sls_detector_header" as C_0001674535970515942906
class C_0001674535970515942906 {
__
}
class "xy" as C_0000162230005032830360
class C_0000162230005032830360 {
__
}
class "RawFileConfig" as C_0000511537329021463656
class C_0000511537329021463656 {
__
}
class "Frame" as C_0001608703618093824988
class C_0001608703618093824988 {
__
}
class "logger::Logger" as C_0001861698262135249810
class C_0001861698262135249810 {
__
}
class "ZmqHeader" as C_0000690012646166089557
class C_0000690012646166089557 {
__
}
class "ZmqSocket" as C_0000575290120620432482
class C_0000575290120620432482 {
__
}
class "ZmqFrame" as C_0001018278375791869829
class C_0001018278375791869829 {
__
}
class "network_io::NetworkError" as C_0001290043041844945927
class C_0001290043041844945927 {
__
}
class "ZmqSocketReceiver" as C_0001017868003595712218
class C_0001017868003595712218 {
__
}
class "ZmqSocketSender" as C_0002178845803227443176
class C_0002178845803227443176 {
__
}
class "DType" as C_0000703695317535186100
class C_0000703695317535186100 {
__
}
class "FileConfig" as C_0001694843161451381081
class C_0001694843161451381081 {
__
}
class "FileInterface" as C_0002122346448923803234
class C_0002122346448923803234 {
__
}
class "File" as C_0002007196654403438648
class C_0002007196654403438648 {
__
}
class "NumpyHeader" as C_0002287674849990076068
class C_0002287674849990076068 {
__
}
class "NumpyFile" as C_0001470720024404954003
class C_0001470720024404954003 {
__
}
class "SubFile" as C_0001884494008888210849
class C_0001884494008888210849 {
__
}
class "RawFile" as C_0001505206538021535080
class C_0001505206538021535080 {
__
}
C_0000800815410987673815 ..|> C_0000853339819629793090
C_0001549403386232143110 ..|> C_0000853339819629793090
C_0000823076622246857026 ..|> C_0001181947618035129503
C_0002198222861307321825 ..|> C_0001181947618035129503
C_0001181947618035129503 ..> C_0001549403386232143110
C_0001181947618035129503 ..> C_0000823076622246857026
C_0001181947618035129503 ..> C_0002198222861307321825
C_0001018278375791869829 o-- C_0000690012646166089557 : +header
C_0001018278375791869829 o-- C_0001608703618093824988 : +frame
C_0001017868003595712218 ..> C_0001018278375791869829
C_0001017868003595712218 ..> C_0000690012646166089557
C_0000575290120620432482 <|-- C_0001017868003595712218
C_0002178845803227443176 ..> C_0000690012646166089557
C_0002178845803227443176 ..> C_0001018278375791869829
C_0000575290120620432482 <|-- C_0002178845803227443176
C_0001694843161451381081 o-- C_0000703695317535186100 : +dtype
C_0001694843161451381081 o-- C_0000162230005032830360 : +geometry
C_0002122346448923803234 ..> C_0001608703618093824988
C_0002007196654403438648 ..> C_0001694843161451381081
C_0002007196654403438648 ..> C_0001608703618093824988
C_0002007196654403438648 --> C_0002122346448923803234 : -file_impl
C_0002287674849990076068 o-- C_0000703695317535186100 : +dtype
C_0001470720024404954003 ..> C_0001694843161451381081
C_0001470720024404954003 ..> C_0001608703618093824988
C_0001470720024404954003 ..> C_0000703695317535186100
C_0001470720024404954003 o-- C_0002287674849990076068 : -m_header
C_0002122346448923803234 <|-- C_0001470720024404954003
C_0001884494008888210849 o-- C_0001884494008888210849 : #read_impl_map
C_0001505206538021535080 ..> C_0001694843161451381081
C_0001505206538021535080 ..> C_0001608703618093824988
C_0001505206538021535080 ..> C_0001674535970515942906
C_0001505206538021535080 --> C_0001884494008888210849 : -subfiles
C_0001505206538021535080 o-- C_0000162230005032830360 : -geometry
C_0001505206538021535080 o-- C_0000162230005032830360 : -positions
C_0001505206538021535080 o-- C_0000511537329021463656 : -cfg
C_0002122346448923803234 <|-- C_0001505206538021535080
'Generated with clang-uml, version 0.5.1
'LLVM version clang version 17.0.6 (Fedora 17.0.6-2.fc39)
@enduml

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 63 KiB

View File

@ -1,95 +0,0 @@
@startuml
class "sls_detector_header" as C_0001674535970515942906
class C_0001674535970515942906 {
__
}
class "RawFileConfig" as C_0000511537329021463656
class C_0000511537329021463656 {
__
}
class "Frame" as C_0001608703618093824988
class C_0001608703618093824988 {
__
}
class "ZmqHeader" as C_0000690012646166089557
class C_0000690012646166089557 {
__
}
class "ZmqSocket" as C_0000575290120620432482
class C_0000575290120620432482 {
__
}
class "ZmqFrame" as C_0001018278375791869829
class C_0001018278375791869829 {
__
}
class "ZmqSocketReceiver" as C_0001017868003595712218
class C_0001017868003595712218 {
__
}
class "ZmqSocketSender" as C_0002178845803227443176
class C_0002178845803227443176 {
__
}
class "DType" as C_0000703695317535186100
class C_0000703695317535186100 {
__
}
class "FileConfig" as C_0001694843161451381081
class C_0001694843161451381081 {
__
}
class "FileInterface" as C_0002122346448923803234
class C_0002122346448923803234 {
__
}
class "File" as C_0002007196654403438648
class C_0002007196654403438648 {
__
}
class "NumpyHeader" as C_0002287674849990076068
class C_0002287674849990076068 {
__
}
class "NumpyFile" as C_0001470720024404954003
class C_0001470720024404954003 {
__
}
class "SubFile" as C_0001884494008888210849
class C_0001884494008888210849 {
__
}
class "RawFile" as C_0001505206538021535080
class C_0001505206538021535080 {
__
}
C_0001018278375791869829 o-- C_0000690012646166089557 : +header
C_0001018278375791869829 o-- C_0001608703618093824988 : +frame
C_0001017868003595712218 ..> C_0001018278375791869829
C_0001017868003595712218 ..> C_0000690012646166089557
C_0000575290120620432482 <|-- C_0001017868003595712218
C_0002178845803227443176 ..> C_0000690012646166089557
C_0002178845803227443176 ..> C_0001018278375791869829
C_0000575290120620432482 <|-- C_0002178845803227443176
C_0001694843161451381081 o-- C_0000703695317535186100 : +dtype
C_0002122346448923803234 ..> C_0001608703618093824988
C_0002007196654403438648 ..> C_0001694843161451381081
C_0002007196654403438648 ..> C_0001608703618093824988
C_0002007196654403438648 --> C_0002122346448923803234 : -file_impl
C_0002287674849990076068 o-- C_0000703695317535186100 : +dtype
C_0001470720024404954003 ..> C_0001694843161451381081
C_0001470720024404954003 ..> C_0001608703618093824988
C_0001470720024404954003 ..> C_0000703695317535186100
C_0001470720024404954003 o-- C_0002287674849990076068 : -m_header
C_0002122346448923803234 <|-- C_0001470720024404954003
C_0001884494008888210849 o-- C_0001884494008888210849 : #read_impl_map
C_0001505206538021535080 ..> C_0001694843161451381081
C_0001505206538021535080 ..> C_0001608703618093824988
C_0001505206538021535080 ..> C_0001674535970515942906
C_0001505206538021535080 --> C_0001884494008888210849 : -subfiles
C_0001505206538021535080 o-- C_0000511537329021463656 : -cfg
C_0002122346448923803234 <|-- C_0001505206538021535080
'Generated with clang-uml, version 0.5.1
'LLVM version clang version 17.0.6 (Fedora 17.0.6-2.fc39)
@enduml

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 41 KiB

View File

@ -1,267 +0,0 @@
@startuml
class "aare::sls_detector_header" as C_0001674535970515942906
class C_0001674535970515942906 {
__
+bunchId : uint64_t
+column : uint16_t
+debug : uint32_t
+detType : uint8_t
+expLength : uint32_t
+frameNumber : uint64_t
+modId : uint16_t
+packetMask : uint8_t[64]
+packetNumber : uint32_t
+reserved : uint16_t
+roundRNumber : uint16_t
+row : uint16_t
+timestamp : uint64_t
+version : uint8_t
}
class "aare::xy" as C_0000162230005032830360
class C_0000162230005032830360 {
+operator!=(const xy & other) const : bool
+operator==(const xy & other) const : bool
__
+col : int
+row : int
}
enum "aare::DetectorType" as C_0000214432771357383463
enum C_0000214432771357383463 {
Jungfrau
Eiger
Mythen3
Moench
ChipTestBoard
}
enum "aare::TimingMode" as C_0000845115331155903292
enum C_0000845115331155903292 {
Auto
Trigger
}
class "aare::RawFileConfig" as C_0000511537329021463656
class C_0000511537329021463656 {
+operator==(const RawFileConfig & other) const : bool
__
+module_gap_col : int
+module_gap_row : int
}
enum "aare::endian" as C_0000190468130082798308
enum C_0000190468130082798308 {
little
big
native
}
class "aare::DType" as C_0000703695317535186100
class C_0000703695317535186100 {
+DType(const std::type_info & t) : void
+DType(std::string_view sv) : void
+DType(DType::TypeIndex ti) : void
..
+operator!=(const DType & other) const noexcept : bool
+operator!=(const std::type_info & t) const : bool
+operator==(const DType & other) const noexcept : bool
+operator==(const std::type_info & t) const : bool
..
+bitdepth() const : uint8_t
+str() const : std::string
__
-m_type : TypeIndex
}
enum "aare::DType::TypeIndex" as C_0000575426556754591775
enum C_0000575426556754591775 {
INT8
UINT8
INT16
UINT16
INT32
UINT32
INT64
UINT64
FLOAT
DOUBLE
ERROR
}
class "aare::NDView<T,ssize_t Ndim=2>" as C_0000853339819629793090
class C_0000853339819629793090 {
+NDView() : void
+NDView(T * buffer, std::array<ssize_t,Ndim> shape) : void
+NDView(T * buffer, const std::vector<ssize_t> & shape) : void
+NDView(const NDView<T,Ndim> &) = default : void
+NDView(NDView<T,Ndim> &&) = default : void
..
+operator=(const NDView<T,Ndim> & other) : NDView<T,Ndim> &
..
+operator()(ssize_t i) : T &
+operator()<Ix...>(Ix... index) : typename std::enable_if<sizeof...(Ix) == Ndim, T &>::type
+operator()<Ix...>(Ix... index) const : typename std::enable_if<sizeof...(Ix) == Ndim, T &>::type
+operator*=(const T val) : NDView<T,Ndim> &
+operator+=(const T val) : NDView<T,Ndim> &
+operator-=(const T val) : NDView<T,Ndim> &
+operator/=(const T val) : NDView<T,Ndim> &
+operator/=(const NDView<T,Ndim> & other) : NDView<T,Ndim> &
+operator=(const T val) : NDView<T,Ndim> &
+operator==(const NDView<T,Ndim> & other) const : bool
+operator[](ssize_t i) : T &
..
+begin() : T *
+data() : T *
-elemenwise<BinaryOperation>(T val, BinaryOperation op) : NDView<T, Ndim> &
-elemenwise<BinaryOperation>(const NDView<T,Ndim> & other, BinaryOperation op) : NDView<T, Ndim> &
+end() : T *
+shape() : auto &
+shape(ssize_t i) const : auto
+size() const : ssize_t
__
-buffer_ : T *
-shape_ : std::array<ssize_t,Ndim>
-size_ : ssize_t
-strides_ : std::array<ssize_t,Ndim>
}
class "aare::NDView<unsigned short,2L>" as C_0000800815410987673815
class C_0000800815410987673815 {
+NDView() : void
+NDView(unsigned short * buffer, std::array<ssize_t,2L> shape) : void
+NDView(unsigned short * buffer, const std::vector<ssize_t> & shape) : void
+NDView(const aare::NDView<uint16_t,2> &) = default : void
+NDView(aare::NDView<uint16_t,2> &&) = default : void
..
+operator=(const aare::NDView<uint16_t,2> & other) : aare::NDView<uint16_t,2> &
..
+operator()(ssize_t i) : unsigned short &
+operator()<Ix...>(Ix... index) : typename std::enable_if<sizeof...(Ix) == 2L, unsigned short &>::type
+operator()<Ix...>(Ix... index) const : typename std::enable_if<sizeof...(Ix) == 2L, unsigned short &>::type
+operator*=(const unsigned short val) : aare::NDView<uint16_t,2> &
+operator+=(const unsigned short val) : aare::NDView<uint16_t,2> &
+operator-=(const unsigned short val) : aare::NDView<uint16_t,2> &
+operator/=(const unsigned short val) : aare::NDView<uint16_t,2> &
+operator/=(const aare::NDView<uint16_t,2> & other) : aare::NDView<uint16_t,2> &
+operator=(const unsigned short val) : aare::NDView<uint16_t,2> &
+operator==(const aare::NDView<uint16_t,2> & other) const : bool
+operator[](ssize_t i) : unsigned short &
..
+begin() : unsigned short *
+data() : unsigned short *
-elemenwise<BinaryOperation>(unsigned short val, BinaryOperation op) : NDView<uint16_t, 2> &
-elemenwise<BinaryOperation>(const aare::NDView<uint16_t,2> & other, BinaryOperation op) : NDView<uint16_t, 2> &
+end() : unsigned short *
+shape() : std::array<ssize_t,2L> &
+shape(ssize_t i) const : value_type
+size() const : ssize_t
__
-buffer_ : unsigned short *
-shape_ : std::array<ssize_t,2L>
-size_ : ssize_t
-strides_ : std::array<ssize_t,2L>
}
class "aare::NDView<T,Ndim>" as C_0001549403386232143110
class C_0001549403386232143110 {
__
}
class "aare::NDArray<bool,Ndim>" as C_0000823076622246857026
class C_0000823076622246857026 {
__
}
class "aare::NDArray<V,Ndim>" as C_0002198222861307321825
class C_0002198222861307321825 {
__
}
class "aare::NDArray<T,ssize_t Ndim=2>" as C_0001181947618035129503
class C_0001181947618035129503 {
+NDArray() : void
+NDArray(std::array<ssize_t,Ndim> shape) : void
+NDArray(std::array<ssize_t,Ndim> shape, T value) : void
+NDArray(NDView<T,Ndim> span) : void
+NDArray(NDArray<T,Ndim> && other) : void
+NDArray(const NDArray<T,Ndim> & other) : void
+~NDArray() : void
..
+operator=(NDArray<T,Ndim> && other) : NDArray<T,Ndim> &
+operator=(const NDArray<T,Ndim> & other) : NDArray<T,Ndim> &
..
+operator!=(const NDArray<T,Ndim> & other) const : bool
+operator&=(const T &) : NDArray<T,Ndim> &
+operator()<Ix...>(Ix... index) const : typename std::enable_if<sizeof...(Ix) == Ndim, T &>::type
+operator()<Ix...>(Ix... index) : typename std::enable_if<sizeof...(Ix) == Ndim, T &>::type
+operator()(int i) const : const T &
+operator()(int i) : T &
+operator*(const NDArray<T,Ndim> & other) : NDArray<T,Ndim>
+operator*(const T &) : NDArray<T,Ndim>
+operator*=(const NDArray<T,Ndim> & other) : NDArray<T,Ndim> &
+operator*=(const T &) : NDArray<T,Ndim> &
+operator+(const NDArray<T,Ndim> & other) : NDArray<T,Ndim>
+operator+(const T &) : NDArray<T,Ndim>
+operator++() : NDArray<T,Ndim> &
+operator+=(const NDArray<T,Ndim> & other) : NDArray<T,Ndim> &
+operator+=(const T &) : NDArray<T,Ndim> &
+operator-(const T &) : NDArray<T,Ndim>
+operator-(const NDArray<T,Ndim> & other) : NDArray<T,Ndim>
+operator-=(const T &) : NDArray<T,Ndim> &
+operator-=(const NDArray<T,Ndim> & other) : NDArray<T,Ndim> &
+operator/(const T &) : NDArray<T,Ndim>
+operator/(const NDArray<T,Ndim> & other) : NDArray<T,Ndim>
+operator/=(const T &) : NDArray<T,Ndim> &
+operator/=<V>(const NDArray<V,Ndim> & other) : NDArray<T, Ndim> &
+operator=(const T &) : NDArray<T,Ndim> &
+operator==(const NDArray<T,Ndim> & other) const : bool
+operator>(const NDArray<T,Ndim> & other) : NDArray<bool,Ndim>
..
+Print() : void
+Print_all() : void
+Print_some() : void
+begin() : auto
+buffer() : std::byte *
+byte_strides() const noexcept : std::array<ssize_t,Ndim>
+data() : T *
+end() : auto
+reset() : void
+shape(ssize_t i) const noexcept : ssize_t
+shape() const noexcept : std::array<ssize_t,Ndim>
+size() const : ssize_t
+span() const : NDView<T,Ndim>
+sqrt() : void
+strides() const noexcept : std::array<ssize_t,Ndim>
+total_bytes() const : size_t
+value<Ix...>(Ix... index) : typename std::enable_if<sizeof...(Ix) == Ndim, T>::type
__
-data_ : T *
-shape_ : std::array<ssize_t,Ndim>
-size_ : ssize_t
-strides_ : std::array<ssize_t,Ndim>
}
class "aare::Frame" as C_0001608703618093824988
class C_0001608703618093824988 {
+Frame(ssize_t rows, ssize_t cols, ssize_t m_bitdepth) : void
+Frame(std::byte * fp, ssize_t rows, ssize_t cols, ssize_t m_bitdepth) : void
+Frame(Frame && other) : void
+Frame(const Frame & other) : void
+~Frame() : void
..
+operator=(Frame & other) : Frame &
..
+bitdepth() const : ssize_t
+cols() const : ssize_t
+data() const : std::byte *
+get(int row, int col) : std::byte *
+image<T>() : NDArray<T>
+rows() const : ssize_t
+set<T>(int row, int col, T data) : void
+size() const : ssize_t
+view<T>() : NDView<T>
__
-m_bitdepth : ssize_t
-m_cols : ssize_t
-m_data : std::byte *
-m_rows : ssize_t
}
C_0000575426556754591775 --+ C_0000703695317535186100
C_0000800815410987673815 ..|> C_0000853339819629793090
C_0001549403386232143110 ..|> C_0000853339819629793090
C_0000823076622246857026 ..|> C_0001181947618035129503
C_0002198222861307321825 ..|> C_0001181947618035129503
C_0001181947618035129503 ..> C_0001549403386232143110
C_0001181947618035129503 ..> C_0000823076622246857026
C_0001181947618035129503 ..> C_0002198222861307321825
'Generated with clang-uml, version 0.5.1
'LLVM version clang version 17.0.6 (Fedora 17.0.6-2.fc39)
@enduml

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 80 KiB

View File

@ -1,200 +0,0 @@
@startuml
enum "aare::DetectorType" as C_0000214432771357383463
enum C_0000214432771357383463 {
Jungfrau
Eiger
Mythen3
Moench
ChipTestBoard
}
class "aare::Frame" as C_0001608703618093824988
class C_0001608703618093824988 {
+Frame(ssize_t rows, ssize_t cols, ssize_t m_bitdepth) : void
+Frame(std::byte * fp, ssize_t rows, ssize_t cols, ssize_t m_bitdepth) : void
+Frame(Frame && other) : void
+Frame(const Frame & other) : void
+~Frame() : void
..
+operator=(Frame & other) : Frame &
..
+bitdepth() const : ssize_t
+cols() const : ssize_t
+data() const : std::byte *
+get(int row, int col) : std::byte *
+image<T>() : NDArray<T>
+rows() const : ssize_t
+set<T>(int row, int col, T data) : void
+size() const : ssize_t
+view<T>() : NDView<T>
__
-m_bitdepth : ssize_t
-m_cols : ssize_t
-m_data : std::byte *
-m_rows : ssize_t
}
class "aare::FileConfig" as C_0001694843161451381081
class C_0001694843161451381081 {
+operator!=(const FileConfig & other) const : bool
+operator==(const FileConfig & other) const : bool
__
+cols : uint64_t
+dtype : aare::DType
+geometry : xy
+rows : uint64_t
}
abstract "aare::FileInterface" as C_0002122346448923803234
abstract C_0002122346448923803234 {
+~FileInterface() : void
..
{abstract} +bitdepth() const = 0 : ssize_t
{abstract} +bytes_per_frame() = 0 : size_t
{abstract} +cols() const = 0 : ssize_t
{abstract} +frame_number(size_t frame_index) = 0 : size_t
+iread(size_t frame_number) : Frame
+iread(size_t frame_number, size_t n_frames) : std::vector<Frame>
{abstract} +pixels() = 0 : size_t
{abstract} +read() = 0 : Frame
{abstract} +read(size_t n_frames) = 0 : std::vector<Frame>
{abstract} +read_into(std::byte * image_buf) = 0 : void
{abstract} +read_into(std::byte * image_buf, size_t n_frames) = 0 : void
{abstract} +rows() const = 0 : ssize_t
{abstract} +seek(size_t frame_number) = 0 : void
{abstract} +tell() = 0 : size_t
{abstract} +total_frames() const = 0 : size_t
{abstract} +write(Frame & frame) = 0 : void
__
+current_frame : size_t
+m_base_name : std::string
+m_base_path : std::filesystem::path
+m_bitdepth : ssize_t
+m_cols : ssize_t
+m_ext : std::string
+m_findex : int
+m_fname : std::filesystem::path
+m_mode : std::string
+m_rows : ssize_t
+m_total_frames : size_t
+m_type : DetectorType
+max_frames_per_file : size_t
+version : std::string
}
class "aare::File" as C_0002007196654403438648
class C_0002007196654403438648 {
+File(std::filesystem::path fname, std::string mode, FileConfig cfg = {}) : void
+File(File && other) : void
+~File() : void
..
+bitdepth() const : ssize_t
+bytes_per_frame() : size_t
+cols() const : ssize_t
+frame_number(size_t frame_index) : size_t
+iread(size_t frame_number) : Frame
+pixels() : size_t
+read() : Frame
+read(size_t n_frames) : std::vector<Frame>
+read_into(std::byte * image_buf) : void
+read_into(std::byte * image_buf, size_t n_frames) : void
+rows() const : ssize_t
+seek(size_t frame_number) : void
+tell() const : size_t
+total_frames() const : size_t
+write(Frame & frame) : void
__
-file_impl : FileInterface *
}
class "aare::NumpyFile" as C_0001470720024404954003
class C_0001470720024404954003 {
+NumpyFile(const std::filesystem::path & fname, const std::string & mode = "r", FileConfig cfg = {}) : void
+~NumpyFile() : void
..
+bitdepth() const : ssize_t
+bytes_per_frame() : size_t
+cols() const : ssize_t
+dtype() const : DType
+frame_number(size_t frame_index) : size_t
-get_frame(size_t frame_number) : Frame
-get_frame_into(size_t, std::byte *) : void
+load<T,size_t NDim>() : NDArray<T, NDim>
-load_metadata() : void
+pixels() : size_t
+read() : Frame
+read(size_t n_frames) : std::vector<Frame>
+read_into(std::byte * image_buf, size_t n_frames) : void
+read_into(std::byte * image_buf) : void
+rows() const : ssize_t
+seek(size_t frame_number) : void
+shape() const : std::vector<size_t>
+tell() : size_t
+total_frames() const : size_t
+write(Frame & frame) : void
__
-current_frame : size_t
-fp : FILE *
-header_len : uint32_t
-header_len_size : uint8_t
-header_size : size_t
-initial_header_len : size_t
-m_header : NumpyHeader
-major_ver_ : uint8_t
-minor_ver_ : uint8_t
}
class "aare::RawFile" as C_0001505206538021535080
class C_0001505206538021535080 {
+RawFile(const std::filesystem::path & fname, const std::string & mode = "r", const FileConfig & cfg = {}) : void
+~RawFile() : void
..
+bitdepth() const : ssize_t
+bytes_per_frame() : size_t
+cols() const : ssize_t
+data_fname(int mod_id, int file_id) : std::filesystem::path
-find_geometry() : void
+find_number_of_subfiles() : void
+frame_number(size_t frame_index) : size_t
-get_frame(size_t frame_number) : Frame
-get_frame_into(size_t frame_number, std::byte * image_buf) : void
{static} +is_master_file(std::filesystem::path fpath) : bool
+master_fname() : std::filesystem::path
-open_subfiles() : void
-parse_fname() : void
-parse_json_metadata() : void
-parse_metadata() : void
-parse_raw_metadata() : void
+pixels() : size_t
+read(size_t n_frames) : std::vector<Frame>
+read() : Frame
-read_header(const std::filesystem::path & fname) : sls_detector_header
+read_into(std::byte * image_buf, size_t n_frames) : void
+read_into(std::byte * image_buf) : void
+rows() const : ssize_t
+seek(size_t frame_number) : void
+set_config(int row, int col) : void
+tell() : size_t
+total_frames() const : size_t
+write(Frame & frame) : void
__
-cfg : RawFileConfig
-geometry : xy
-n_subfile_parts : size_t
-n_subfiles : size_t
-positions : std::vector<xy>
-quad : bool
-subfile_cols : int
-subfile_rows : int
-subfiles : std::vector<std::vector<SubFile *>>
-timing_mode : TimingMode
}
C_0002122346448923803234 ..> C_0001608703618093824988
C_0002122346448923803234 o-- C_0000214432771357383463 : +m_type
C_0002007196654403438648 ..> C_0001694843161451381081
C_0002007196654403438648 ..> C_0001608703618093824988
C_0002007196654403438648 --> C_0002122346448923803234 : -file_impl
C_0001470720024404954003 ..> C_0001694843161451381081
C_0001470720024404954003 ..> C_0001608703618093824988
C_0002122346448923803234 <|-- C_0001470720024404954003
C_0001505206538021535080 ..> C_0001694843161451381081
C_0001505206538021535080 ..> C_0001608703618093824988
C_0002122346448923803234 <|-- C_0001505206538021535080
'Generated with clang-uml, version 0.5.1
'LLVM version clang version 17.0.6 (Fedora 17.0.6-2.fc39)
@enduml

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 59 KiB

View File

@ -1,136 +0,0 @@
@startuml
class "aare::Frame" as C_0001608703618093824988
class C_0001608703618093824988 {
+Frame(ssize_t rows, ssize_t cols, ssize_t m_bitdepth) : void
+Frame(std::byte * fp, ssize_t rows, ssize_t cols, ssize_t m_bitdepth) : void
+Frame(Frame && other) : void
+Frame(const Frame & other) : void
+~Frame() : void
..
+operator=(Frame & other) : Frame &
..
+bitdepth() const : ssize_t
+cols() const : ssize_t
+data() const : std::byte *
+get(int row, int col) : std::byte *
+image<T>() : NDArray<T>
+rows() const : ssize_t
+set<T>(int row, int col, T data) : void
+size() const : ssize_t
+view<T>() : NDView<T>
__
-m_bitdepth : ssize_t
-m_cols : ssize_t
-m_data : std::byte *
-m_rows : ssize_t
}
class "aare::ZmqHeader" as C_0000690012646166089557
class C_0000690012646166089557 {
+operator==(const ZmqHeader & other) const : bool
..
+from_string(std::string & s) : void
+to_string() const : std::string
__
+acqIndex : uint64_t
+addJsonHeader : std::map<std::string,std::string>
+column : uint16_t
+completeImage : bool
+data : bool
+detSpec1 : uint64_t
+detSpec2 : uint16_t
+detSpec3 : uint32_t
+detSpec4 : uint16_t
+detType : uint8_t
+dynamicRange : uint32_t
+expLength : uint32_t
+fileIndex : uint64_t
+flipRows : int
+fname : std::string
+frameIndex : uint64_t
+frameNumber : uint64_t
+imageSize : uint32_t
+jsonversion : uint32_t
+modId : uint16_t
+ndetx : uint32_t
+ndety : uint32_t
+npixelsx : uint32_t
+npixelsy : uint32_t
+packetNumber : uint32_t
+progress : double
+quad : uint32_t
+row : uint16_t
+rx_roi : std::array<int,4>
+timestamp : uint64_t
+version : uint8_t
}
class "aare::ZmqSocket" as C_0000575290120620432482
class C_0000575290120620432482 {
+ZmqSocket() = default : void
+ZmqSocket(const ZmqSocket &) = deleted : void
+ZmqSocket(ZmqSocket &&) = deleted : void
+~ZmqSocket() : void
..
+operator=(const ZmqSocket &) = deleted : ZmqSocket
..
+disconnect() : void
+set_potential_frame_size(size_t size) : void
+set_timeout_ms(int n) : void
+set_zmq_hwm(int hwm) : void
__
#m_context : void *
#m_endpoint : std::string
#m_header_buffer : char *
{static} #m_max_header_size : const size_t
#m_potential_frame_size : size_t
#m_socket : void *
#m_timeout_ms : int
#m_zmq_hwm : int
}
class "aare::ZmqFrame" as C_0001018278375791869829
class C_0001018278375791869829 {
__
+frame : Frame
+header : ZmqHeader
}
class "aare::network_io::NetworkError" as C_0001290043041844945927
class C_0001290043041844945927 {
+NetworkError(const char * msg) : void
+NetworkError(const std::string msg) : void
..
+what() const noexcept : const char *
__
-m_msg : const char *
}
class "aare::ZmqSocketReceiver" as C_0001017868003595712218
class C_0001017868003595712218 {
+ZmqSocketReceiver(const std::string & endpoint) : void
..
+connect() : void
-receive_data(std::byte * data, size_t size) : int
-receive_header() : ZmqHeader
+receive_n() : std::vector<ZmqFrame>
-receive_zmqframe() : ZmqFrame
__
}
class "aare::ZmqSocketSender" as C_0002178845803227443176
class C_0002178845803227443176 {
+ZmqSocketSender(const std::string & endpoint) : void
..
+bind() : void
+send(const ZmqHeader & header, const std::byte * data, size_t size) : size_t
+send(const ZmqFrame & zmq_frame) : size_t
+send(const std::vector<ZmqFrame> & zmq_frames) : size_t
__
}
C_0001018278375791869829 o-- C_0000690012646166089557 : +header
C_0001018278375791869829 o-- C_0001608703618093824988 : +frame
C_0001017868003595712218 ..> C_0001018278375791869829
C_0001017868003595712218 ..> C_0000690012646166089557
C_0000575290120620432482 <|-- C_0001017868003595712218
C_0002178845803227443176 ..> C_0000690012646166089557
C_0002178845803227443176 ..> C_0001018278375791869829
C_0000575290120620432482 <|-- C_0002178845803227443176
'Generated with clang-uml, version 0.5.1
'LLVM version clang version 17.0.6 (Fedora 17.0.6-2.fc39)
@enduml

Some files were not shown because too many files have changed in this diff Show More