mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-05-10 06:42:04 +02:00
fixed fmt error (#302)
This commit is contained in:
@@ -171,11 +171,14 @@ Coordinate2D Interpolator::transform_eta_values(const Eta2<T> &eta) const {
|
||||
|
||||
if (static_cast<ssize_t>(ix) >= m_etabinsx.size() - 1 ||
|
||||
static_cast<ssize_t>(iy) >= m_etabinsy.size() - 1 ||
|
||||
static_cast<ssize_t>(ie) >= m_energy_bins.size() - 1)
|
||||
throw std::runtime_error(
|
||||
fmt::format("Eta values out of bounds of eta distribution: eta.x = "
|
||||
"{:.4f}, eta.y = {:.4f}, energy = {:.4f}",
|
||||
eta.x, eta.y, eta.sum));
|
||||
static_cast<ssize_t>(ie) >= m_energy_bins.size() - 1) {
|
||||
throw std::runtime_error(fmt::format(
|
||||
"Eta values (eta.x = {:4f}, eta.y = {:4f}, energy = {}) out of "
|
||||
"bounds of eta distribution with largest values: (eta.x = {:4f}, "
|
||||
"eta.y = {:4f}, energy = {:4f})",
|
||||
eta.x, eta.y, eta.sum, *(m_etabinsx.end() - 1),
|
||||
*(m_etabinsy.end() - 1), *(m_energy_bins.end() - 1)));
|
||||
}
|
||||
|
||||
// TODO: bilinear interpolation only works if all bins have a size > 1 -
|
||||
// otherwise bilinear interpolation with zero values which skew the
|
||||
|
||||
Reference in New Issue
Block a user