You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then the start of the occultuniform function will look like this:
import numba
@numba.jit(numba.float64[:](numba.float64[:], numba.float64))
def occultuniform(b0, w):
"""
Compute the lightcurve for occultation of a uniform source without microlensing (Mandel & Agol 2002).
:param b0: array; impact parameter in units of stellar radii
:param w: array; occulting star size in units of stellar radius
:return: muo1: float; fraction of flux at each b0 for a uniform source
"""
if np.abs(w - 0.5) < 1.0e-3:
w = 0.5
This trick requires the numba library, it can be installed it by adding the following in a Jupyter cell at the top of the notebook:
Give it a go if you have time. I was passed this information second hand but wanted to attribute credit here. It might be a good test for anything else you want to do with numba
Some possible speed improvements to occultnl the transit model fitting. Suggested by Lavender Elle Hanson (JHU).
Insert the following two lines immediately before the occultuniform function:
Then the start of the occultuniform function will look like this:
This trick requires the numba library, it can be installed it by adding the following in a Jupyter cell at the top of the notebook:
or (if that doesn’t work)
The text was updated successfully, but these errors were encountered: