From cfb558f938f84e472b850dae027a10ade51cc52b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 19:20:26 +0000 Subject: [PATCH 1/2] Initial plan From 6a12973fc79d0db660848c59818c112c6746dd77 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 19:25:34 +0000 Subject: [PATCH 2/2] Add sign_magneticfield validation to exchange_legendre.py Co-authored-by: skilledwolf <18141588+skilledwolf@users.noreply.github.com> --- src/quantumhall_matrixelements/exchange_legendre.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/quantumhall_matrixelements/exchange_legendre.py b/src/quantumhall_matrixelements/exchange_legendre.py index 0bbf0cb..638c4f1 100644 --- a/src/quantumhall_matrixelements/exchange_legendre.py +++ b/src/quantumhall_matrixelements/exchange_legendre.py @@ -65,6 +65,9 @@ def get_exchange_kernels_GaussLegendre( # ----------------------------- # 0. Input handling # ----------------------------- + if sign_magneticfield not in (1, -1): + raise ValueError("sign_magneticfield must be 1 or -1") + G_magnitudes = np.asarray(G_magnitudes, dtype=float) G_angles = np.asarray(G_angles, dtype=float) if G_magnitudes.shape != G_angles.shape: