def flux(self, time, planets = None, cadence = 'lc'):
'''
'''
# Ensure it's a list
if planets is None:
planets = self.planets
elif type(planets) is str:
planets = [planets]
# Compute flux for each planet
flux = np.ones_like(time)
for planet in planets:
if cadence == 'lc':
model = ps.Transit(per = self.period[planet], b = self.b[planet], RpRs = self.RpRs[planet], t0 = self.t0[planet],
rhos = self.rhos, ecc = self.ecc[planet], w = self.w[planet] * np.pi / 180., u1 = self.u1,
u2 = self.u2, times = self.times[planet])
else:
model = ps.Transit(per = self.period[planet], b = self.b[planet], RpRs = self.RpRs[planet], t0 = self.t0[planet],
rhos = self.rhos, ecc = self.ecc[planet], w = self.w[planet] * np.pi / 180., u1 = self.u1,
u2 = self.u2, times = self.times[planet], exptime = ps.KEPSHRTCAD)
flux *= model(time)
return flux
评论列表
文章目录