mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-04-30 10:20:03 +02:00
inverted gain map
This commit is contained in:
parent
b501c31e38
commit
c6e8e5f6a1
@ -1,6 +1,6 @@
|
||||
package:
|
||||
name: aare
|
||||
version: 2025.4.1 #TODO! how to not duplicate this?
|
||||
version: 2025.4.22 #TODO! how to not duplicate this?
|
||||
|
||||
|
||||
|
||||
|
@ -124,7 +124,7 @@ class ClusterFile {
|
||||
|
||||
/**
|
||||
* @brief Set the gain map to use when reading clusters. If set the gain map will be applied
|
||||
* to the clusters that pass ROI and noise_map selection.
|
||||
* to the clusters that pass ROI and noise_map selection. The gain map is expected to be in ADU/energy.
|
||||
*/
|
||||
void set_gain_map(const NDView<double, 2> gain_map);
|
||||
|
||||
|
@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"
|
||||
|
||||
[project]
|
||||
name = "aare"
|
||||
version = "2025.4.2"
|
||||
version = "2025.4.22"
|
||||
requires-python = ">=3.11"
|
||||
dependencies = [
|
||||
"numpy",
|
||||
|
@ -41,6 +41,12 @@ void ClusterFile::set_noise_map(const NDView<int32_t, 2> noise_map){
|
||||
|
||||
void ClusterFile::set_gain_map(const NDView<double, 2> gain_map){
|
||||
m_gain_map = NDArray<double, 2>(gain_map);
|
||||
|
||||
// Gain map is passed as ADU/keV to avoid dividing in when applying the gain
|
||||
// map we invert it here
|
||||
for (auto &item : m_gain_map->view()) {
|
||||
item = 1.0 / item;
|
||||
}
|
||||
}
|
||||
|
||||
ClusterFile::~ClusterFile() { close(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user