Exemple #1
0
import numpy as np
import matplotlib.pyplot as pl
from pytransit import Gimenez, MandelAgol, z_circular

m_mad = MandelAgol()
m_mal = MandelAgol(lerp=True)
m_gmd = Gimenez(lerp=False)
m_gml = Gimenez(lerp=True)

u = np.array([[0.1,0.1],[0.2,0.2],[0.6,0.3]])

t = np.linspace(-0.2, 0.2, 500)
pl.plot(t, m_mad.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47*np.pi), 'b-',  alpha=0.5)
pl.plot(t, m_mal.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47*np.pi), 'r-',  alpha=0.5)
pl.plot(t, m_gmd.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47*np.pi), 'k--', alpha=1.0)
pl.show()
mafd = MandelAgol(lerp=False)

u = [[0.1, 0.0], [0.2, 0.05], [0.5, 0.4]]
u1 = [0.5, 0.4]

t = np.linspace(-0.2, 0.2, 500)
pl.plot(t,
        mafd.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47 * np.pi),
        ls='-',
        c='0.5',
        lw=1,
        alpha=0.5)  #, drawstyle='steps-mid')
pl.plot(t, macl.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47 * np.pi), 'b-',
        alpha=0.5)  #, drawstyle='steps-mid')
pl.plot(t,
        mgfd.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47 * np.pi) + 1e-4,
        'b-',
        alpha=0.5)  #, drawstyle='steps-mid')
pl.plot(t,
        mgfl.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47 * np.pi) + 2e-4,
        'b-',
        alpha=0.5)  #, drawstyle='steps-mid')

#pl.plot(t, mafl.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47*np.pi), ls='--', c='0.5', lw=3,  alpha=0.5) #, drawstyle='steps-mid')
#pl.plot(t, mafl.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47*np.pi), 'k-',  alpha=0.5) #, drawstyle='steps-mid')
#pl.plot(t, macl.evaluate(t, 0.1, u1, 0.0, 5, 5, 0.47*np.pi), 'b--',  alpha=0.5) #, drawstyle='steps-mid')

pl.ylim(0.98, 1.005)
pl.xlim(-0.2, 0.2)
pl.show()
Exemple #3
0
import numpy as np
import matplotlib.pyplot as pl
from pytransit import Gimenez, MandelAgol, z_circular

m_mad = MandelAgol()
m_mal = MandelAgol(interpolate=True)
m_gmd = Gimenez(interpolate=False)
m_gml = Gimenez(interpolate=True)

u = np.array([[0.1, 0.1], [0.2, 0.2], [0.6, 0.3]])

t = np.linspace(-0.2, 0.2, 500)
pl.plot(t, m_mad.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47 * np.pi), 'b-', alpha=0.5)
pl.plot(t, m_mal.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47 * np.pi), 'r-', alpha=0.5)
pl.plot(t,
        m_gmd.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47 * np.pi),
        'k--',
        alpha=1.0)
pl.show()
Exemple #4
0
import numpy as np
import matplotlib.pyplot as pl
from pytransit import Gimenez, MandelAgol

k, t0, p, a, i, e, w = 0.1, 1., 4., 8., 0.5*np.pi, 0.01, 0.5*np.pi
t = np.linspace(0.9,1.1,20)
#u = np.array([[0.04*iu, 0.025*iu, 0.01*iu] for iu in range(21)])
u = np.array([[0.04*iu, 0.025*iu] for iu in range(4)])
c = np.linspace(0,0.9,u.shape[0])*0

m = Gimenez(lerp=True, npol=100, nldc=2)
m = MandelAgol(lerp=True, nthr=4)
f = m.evaluate(t, k, u, t0, p, a, i, e, w, c=c)

fig,ax = pl.subplots(1,1,figsize=(7,7))
ax.plot(t,f + np.arange(u.shape[0])*0.00, 'k');
pl.setp(ax, ylim=(0.9875,1.011), yticks=[], xlabel='Time [d]', ylabel='Normalised flux', 
        title='Light curve for a set of multiple limb darkening coefficients');
fig.tight_layout()
pl.show()
import numpy as np
import matplotlib.pyplot as pl

from pytransit import Gimenez, MandelAgol, MandelAgolCL, z_circular

mgfd = Gimenez()
mgfl = Gimenez(lerp=True)
macl = MandelAgolCL()
mafl = MandelAgol(lerp=True)
mafd = MandelAgol(lerp=False)

u = [[0.1,0.0], [0.2,0.05], [0.5,0.4]]
u1 = [0.5,0.4]

t = np.linspace(-0.2, 0.2, 500)
pl.plot(t, mafd.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47*np.pi), ls='-', c='0.5', lw=1,  alpha=0.5) #, drawstyle='steps-mid')
pl.plot(t, macl.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47*np.pi), 'b-',  alpha=0.5) #, drawstyle='steps-mid')
pl.plot(t, mgfd.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47*np.pi)+1e-4, 'b-',  alpha=0.5) #, drawstyle='steps-mid')
pl.plot(t, mgfl.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47*np.pi)+2e-4, 'b-',  alpha=0.5) #, drawstyle='steps-mid')

#pl.plot(t, mafl.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47*np.pi), ls='--', c='0.5', lw=3,  alpha=0.5) #, drawstyle='steps-mid')
#pl.plot(t, mafl.evaluate(t, 0.1, u, 0.0, 5, 5, 0.47*np.pi), 'k-',  alpha=0.5) #, drawstyle='steps-mid')
#pl.plot(t, macl.evaluate(t, 0.1, u1, 0.0, 5, 5, 0.47*np.pi), 'b--',  alpha=0.5) #, drawstyle='steps-mid')


pl.ylim(0.98,1.005)
pl.xlim(-0.2,0.2)
pl.show()
import numpy as np
import matplotlib.pyplot as pl
from pytransit import Gimenez, MandelAgol

k, t0, p, a, i, e, w = 0.1, 1., 4., 8., 0.5 * np.pi, 0.01, 0.5 * np.pi
t = np.linspace(0.9, 1.1, 20)
#u = np.array([[0.04*iu, 0.025*iu, 0.01*iu] for iu in range(21)])
u = np.array([[0.04 * iu, 0.025 * iu] for iu in range(4)])
c = np.linspace(0, 0.9, u.shape[0]) * 0

m = Gimenez(lerp=True, npol=100, nldc=2)
m = MandelAgol(lerp=True, nthr=4)
f = m.evaluate(t, k, u, t0, p, a, i, e, w, c=c)

fig, ax = pl.subplots(1, 1, figsize=(7, 7))
ax.plot(t, f + np.arange(u.shape[0]) * 0.00, 'k')
pl.setp(ax,
        ylim=(0.9875, 1.011),
        yticks=[],
        xlabel='Time [d]',
        ylabel='Normalised flux',
        title='Light curve for a set of multiple limb darkening coefficients')
fig.tight_layout()
pl.show()