Dev/automate tests using data (#267)
All checks were successful
Build on RHEL8 / build (push) Successful in 2m13s
Build on RHEL9 / build (push) Successful in 2m37s
Run tests using data on local RHEL8 / build (push) Successful in 3m12s

- automatically run python tests 
- automatically run test using data files on local runner from gitea
- fixed some of the workflows

---------

Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
This commit is contained in:
2026-01-20 17:20:48 +01:00
committed by GitHub
parent cbefbc43e9
commit b77a576f72
11 changed files with 146 additions and 45 deletions

View File

@@ -193,6 +193,7 @@ Interpolator::interpolate(const ClusterVector<ClusterType> &clusters) const {
std::vector<Photon> photons;
photons.reserve(clusters.size());
size_t cluster_index{};
for (const ClusterType &cluster : clusters) {
auto eta = EtaFunction(cluster);
@@ -202,6 +203,14 @@ Interpolator::interpolate(const ClusterVector<ClusterType> &clusters) const {
photon.y = cluster.y;
photon.energy = static_cast<decltype(photon.energy)>(eta.sum);
try {
// check if eta values are within bounds
transform_eta_values(eta);
} catch (const std::runtime_error &e) {
throw std::runtime_error(
fmt::format("{} for cluster: {}", e.what(), cluster_index));
}
auto uniform_coordinates = transform_eta_values(eta);
if (EtaFunction == &calculate_eta2<typename ClusterType::value_type,
@@ -245,6 +254,8 @@ Interpolator::interpolate(const ClusterVector<ClusterType> &clusters) const {
photon.y += uniform_coordinates.y;
}
++cluster_index;
photons.push_back(photon);
}