diff --git a/Device/Coord/CoordSystem1D.cpp b/Device/Coord/CoordSystem1D.cpp index a24f1de6a47e2e362704fdefc75f206f092c2562..9b132a32e92c6e67bf3d1cd89bbc343731a05b5f 100644 --- a/Device/Coord/CoordSystem1D.cpp +++ b/Device/Coord/CoordSystem1D.cpp @@ -16,6 +16,7 @@ #include "Base/Axis/PointwiseAxis.h" #include "Base/Const/Units.h" #include "Base/Math/Constants.h" +#include "Base/Utils/Assert.h" #include "Device/Coord/AxisNames.h" #include "Device/Data/OutputData.h" @@ -194,7 +195,7 @@ AngularReflectometryCoordinates::getTraslatorTo(Axes::Coords units) const case Axes::Coords::RQ4: return [wl = m_wavelength](double value) { return getQ(wl, value); }; default: - throwUnitsError("AngularReflectometryCoordinates::getTraslatorTo", availableUnits()); + ASSERT(0); } } @@ -244,6 +245,6 @@ WavenumberReflectometryCoordinates::getTraslatorTo(Axes::Coords units) const case Axes::Coords::RQ4: return [](double value) { return value; }; default: - throwUnitsError("WavenumberReflectometryCoordinates::getTraslatorTo", availableUnits()); + ASSERT(0); } } diff --git a/Device/Instrument/CoordSystem2D.cpp b/Device/Instrument/CoordSystem2D.cpp index 0ea1468379ed84fbb97f54b544365bfa2443a513..032be4ac44b4bf79bc746c398dc050b7ef377c73 100644 --- a/Device/Instrument/CoordSystem2D.cpp +++ b/Device/Instrument/CoordSystem2D.cpp @@ -152,23 +152,23 @@ double SphericalCoords::calculateValue(size_t i_axis, Axes::Coords units, double case Axes::Coords::DEGREES: return Units::rad2deg(value); case Axes::Coords::QSPACE: { - const auto k_i = vecOfLambdaAlphaPhi(m_wavelength, m_alpha_i, m_phi_i); + const kvector_t k_i = vecOfLambdaAlphaPhi(m_wavelength, m_alpha_i, m_phi_i); if (i_axis == 0) { - const auto k_f = vecOfLambdaAlphaPhi(m_wavelength, 0.0, value); + const kvector_t k_f = vecOfLambdaAlphaPhi(m_wavelength, 0.0, value); return (k_i - k_f).y(); } else if (i_axis == 1) { - const auto k_f = vecOfLambdaAlphaPhi(m_wavelength, value, 0.0); + const kvector_t k_f = vecOfLambdaAlphaPhi(m_wavelength, value, 0.0); return (k_f - k_i).z(); } ASSERT(0); } case Axes::Coords::QXQY: { - const auto k_i = vecOfLambdaAlphaPhi(m_wavelength, m_alpha_i, m_phi_i); + const kvector_t k_i = vecOfLambdaAlphaPhi(m_wavelength, m_alpha_i, m_phi_i); if (i_axis == 0) { - const auto k_f = vecOfLambdaAlphaPhi(m_wavelength, 0.0, value); + const kvector_t k_f = vecOfLambdaAlphaPhi(m_wavelength, 0.0, value); return (k_i - k_f).y(); } else if (i_axis == 1) { - const auto k_f = vecOfLambdaAlphaPhi(m_wavelength, value, 0.0); + const kvector_t k_f = vecOfLambdaAlphaPhi(m_wavelength, value, 0.0); return (k_f - k_i).x(); } ASSERT(0);