From c2a6dd844cbc93e489794523df9b793408b0e4f4 Mon Sep 17 00:00:00 2001 From: arjunsavel Date: Wed, 5 Mar 2025 13:20:47 -0500 Subject: [PATCH] fix the LD! numba does not like np.clip --- src/scope/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scope/utils.py b/src/scope/utils.py index 2c3e1f2..804ed80 100644 --- a/src/scope/utils.py +++ b/src/scope/utils.py @@ -180,8 +180,9 @@ def calc_limb_darkening(u1, u2, a, b, Rstar, ph, LD): """ if LD: # apply limb darkening. 1D style! x = (a * np.sin(2 * np.pi * ph)) / (Rstar * rsun) - mu = np.sqrt(np.clip(1 - x**2 - b**2, 0, 1)) + if x**2 <= 1 - b**2: + mu = np.sqrt(1 - x**2 - b**2) I = 1 - u1 * (1 - mu) - u2 * (1 - mu) ** 2 else: I = 0.0