transit.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:trappist1 作者: rodluger 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号