SimpleLimbDark doesn't vary u1
See original GitHub issueHey Dan,
Now that 0.4 is out, I’m trying out your suggestion from our conversation in starry. It looks like SimpleLimbDark is fast and exactly what I want, but your code example isn’t working. set_u
doesn’t seem to care what you feed in as u1
, the output is always the same. u2
does have an effect though. Was your example wrong? Any idea what’s up?
Here’s the example code and outputs I’m getting:
import matplotlib.pyplot as plt
import numpy as np
from exoplanet.theano_ops.driver import SimpleLimbDark
plt.figure()
bs = np.arange(-1.5, 1.5, 0.01)
rr = 0.2
u2 = 0.2
for u1 in [0., 0.2, 0.4, 0.6]:
ld = SimpleLimbDark()
ld.set_u([u1, u2])
flux = 1 + ld.apply(bs, rr)
plt.plot(bs, flux, label=f'u1 = {u1}, u2 = {u2}')
plt.legend()
plt.figure()
u1 = 0.2
for u2 in [0., 0.2, 0.4, 0.6]:
ld = SimpleLimbDark()
ld.set_u([u1, u2])
flux = 1 + ld.apply(bs, rr)
plt.plot(bs, flux, label=f'u1 = {u1}, u2 = {u2}')
plt.legend()
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Good catch! I think that what you want is
set_u([1, u1, u2])
for now, but let me do a few tests. It’s related to the definitions from the limbdark paper.Yes, that looks correct: just after equation (2) in the paper, it states that

u_0 = -1
.