Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Transit model function
def trend(p,t):
"""
Fit the local transit shape with the following function.
"""
domain = [t.min(),t.max()]
return Legendre(p,domain=domain)(t)
def P051T(p,t):
"""
Protopapas single transit
Single transit + trend
Parameters
----------
p : List of parameters.
p[0] epoch
p[1] df
p[2] tdur
p[3:] passed to trend
P : period
Period is held fixed since for a single transit, it doesnot make
sense to specify period and epoch
"""
P = 100
pP05 = [P , p[0] , p[1] , p[2] ]
sig = P05(pP05,t)
ptrend = p[3:]
tr = trend(ptrend,t)
return sig + tr
def P05(p,t):
"""
Analytic model of Protopapas 2005.
"""
P = p[0]
epoch = p[1]
df = p[2]
tdur = p[3]
tp = tprime(P,epoch,tdur,t)
return df * ( 0.5*( 2. - tanh(c*(tp + 0.5)) + tanh(c*(tp - 0.5)) ) - 1.)
def tprime(P,epoch,tdur,t):
"""
t' in Protopapas
"""
return ( P*sin( pi*(t - epoch) / P ) ) / (pi*tdur)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.