|
11 | 11 |
|
12 | 12 | # Maximum spin number at which Price-McEwen recursion is sufficiently accurate. |
13 | 13 | # For spins > PM_MAX_STABLE_SPIN one should default to the Risbo recursion. |
14 | | -PM_MAX_STABLE_SPIN = 5 |
| 14 | +PM_MAX_STABLE_SPIN = 6 |
15 | 15 |
|
16 | 16 |
|
17 | 17 | def spin_spherical_kernel( |
@@ -66,15 +66,15 @@ def spin_spherical_kernel( |
66 | 66 | + "Defering to complex transform.", |
67 | 67 | stacklevel=2, |
68 | 68 | ) |
69 | | - if recursion.lower() == "price-mcewen" and abs(spin) >= PM_MAX_STABLE_SPIN: |
| 69 | + if recursion.lower() == "price-mcewen" and abs(spin) > PM_MAX_STABLE_SPIN: |
70 | 70 | raise ValueError( |
71 | | - f"The Price-McEwen can become unstable for spins >= {PM_MAX_STABLE_SPIN}." |
| 71 | + f"The Price-McEwen recursion can become unstable for spins >= {PM_MAX_STABLE_SPIN}." |
72 | 72 | ) |
73 | 73 |
|
74 | 74 | if recursion.lower() == "auto": |
75 | 75 | # This mode automatically determines which recursion is best suited for the |
76 | 76 | # current parameter configuration. |
77 | | - recursion = "risbo" if abs(spin) >= PM_MAX_STABLE_SPIN else "price-mcewen" |
| 77 | + recursion = "risbo" if abs(spin) > PM_MAX_STABLE_SPIN else "price-mcewen" |
78 | 78 |
|
79 | 79 | dl = [] |
80 | 80 | m_start_ind = L - 1 if reality else 0 |
@@ -214,15 +214,15 @@ def spin_spherical_kernel_jax( |
214 | 214 | + "Defaulting to complex transform.", |
215 | 215 | stacklevel=2, |
216 | 216 | ) |
217 | | - if recursion.lower() == "price-mcewen" and abs(spin) >= PM_MAX_STABLE_SPIN: |
| 217 | + if recursion.lower() == "price-mcewen" and abs(spin) > PM_MAX_STABLE_SPIN: |
218 | 218 | raise ValueError( |
219 | | - f"The Price-McEwen can become unstable for spins >= {PM_MAX_STABLE_SPIN}." |
| 219 | + f"The Price-McEwen recursion can become unstable for spins >= {PM_MAX_STABLE_SPIN}." |
220 | 220 | ) |
221 | 221 |
|
222 | 222 | if recursion.lower() == "auto": |
223 | 223 | # This mode automatically determines which recursion is best suited for the |
224 | 224 | # current parameter configuration. |
225 | | - recursion = "risbo" if abs(spin) >= PM_MAX_STABLE_SPIN else "price-mcewen" |
| 225 | + recursion = "risbo" if abs(spin) > PM_MAX_STABLE_SPIN else "price-mcewen" |
226 | 226 |
|
227 | 227 | dl = [] |
228 | 228 | m_start_ind = L - 1 if reality else 0 |
|
0 commit comments