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: