From 9ec6cbd9d2301a2bee56762a57e86b83591444d9 Mon Sep 17 00:00:00 2001
From: Wiebe van Breukelen <breukelen@astron.nl>
Date: Tue, 6 May 2025 10:44:50 +0200
Subject: [PATCH] Swapped radec2lmn::operator() remainder lmn indexing

---
 include/Directions.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/Directions.h b/include/Directions.h
index 1534eb8..214f218 100644
--- a/include/Directions.h
+++ b/include/Directions.h
@@ -184,9 +184,9 @@ void radec2lmn::operator()(Arch, const Direction &reference, const C &ra,
     double sin_dec = std::sin(dec[i]);
     double cos_dec = std::cos(dec[i]);
 
-    lmn(i, 0) = cos_dec * sin_delta_ra;
-    lmn(i, 1) = sin_dec * cos_dec0 - cos_dec * sin_dec0 * cos_delta_ra;
-    lmn(i, 2) = sin_dec * sin_dec0 + cos_dec * cos_dec0 * cos_delta_ra;
+    lmn(0, i) = cos_dec * sin_delta_ra;
+    lmn(1, i) = sin_dec * cos_dec0 - cos_dec * sin_dec0 * cos_delta_ra;
+    lmn(2, i) = sin_dec * sin_dec0 + cos_dec * cos_dec0 * cos_delta_ra;
   }
 }
 
@@ -197,7 +197,7 @@ inline void Directions::radec2lmn<Directions::computation_strategy::MULTI_SIMD>(
     const Direction &reference, xt::xtensor<double, 2> &lmn) {
   xt::xtensor<double, 2> lmn_tmp({3, ra.size()});
   xsimd::dispatch(xsimd::radec2lmn{})(reference, ra, dec, lmn_tmp,
-                                      xsimd::aligned_mode());
+                                      xsimd::unaligned_mode());
   lmn = xt::transpose(lmn_tmp);
 }
 #endif
\ No newline at end of file
-- 
GitLab