Erik Fröjdh 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
2025-02-05 15:55:55 +01:00
fix
2024-11-18 15:33:38 +01:00
2025-02-12 16:35:48 +01:00
2025-04-01 14:31:25 +02:00
2025-04-01 14:31:25 +02:00
2025-04-01 14:31:25 +02:00
2025-04-01 14:31:25 +02:00
WIP
2024-11-11 17:13:48 +01:00
2025-02-21 11:18:39 +01:00
2024-11-11 18:22:18 +01:00
2024-10-30 15:07:34 +01:00

aare

Data analysis library for PSI hybrid detectors

Build and install

Prerequisites

  • cmake >= 3.14
  • C++17 compiler (gcc >= 8)
  • python >= 3.10

Development install (for Python)

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 

Now you can use the Python module from your build directory

import aare
f = aare.File('Some/File/I/Want_to_open_master_0.json')

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

#enable your env first!
conda install aare=2024.10.29.dev0 -c slsdetectorgroup

Install to a custom location and use in your project

Working example in: https://github.com/slsdetectorgroup/aare-examples

#build and install aare 
git clone git@github.com:slsdetectorgroup/aare.git --branch=v1 #or using http...
mkdir build
cd build

#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

Local build of conda pkgs

conda build . --variants="{python: [3.11, 3.12, 3.13]}"
Description
Mirrored from github
Readme 106 MiB
Languages
C++ 90.5%
CMake 5.7%
Python 3.8%