Esempio n. 1
0
def transitquick_circ_rprs(t,p):
    """ Computes a transit lightcurve, normalized to unity, as a
     function of time, t, usually in HJD or BJD.

     Input parameters (x) are:
     p[0] = tT = transit duration in days
     p[1] = tG = ingress/egress duration in days
     p[2] = RpRsSQ = (R_p/R_*)^2 ~ transit depth
     p[3] = u1 = linear limb-darkening parameter
     p[4] = u2 = quadratic limb-darkening coefficient
     p[5] = F0 = uneclipsed flux
     p[6] = Period = calculated in multi_transitquick
     p[7] = T0.TN = Transit time
     """
    
    RpRs = np.sqrt(p[2])
    th = (2e0*np.pi/p[6])*(t-p[7])
    vel = 2e0*np.sqrt(RpRs/(p[0]*p[1]))
    aRs = p[6]*vel/(2e0*np.pi)
    b = (np.sqrt(1e0-(p[0]/p[1])*RpRs))
    inc = np.arccos(b/aRs)

    z0 = aRs*np.sqrt(1e0 - (np.cos(th)*np.sin(inc))**2e0)
    out = tqe.occultquad(z0,p[3],p[4],RpRs)
    flux= out[:][0]*p[5]
    #print RpRs, vel, aRs, b, inc, a5, a4, a0
    return flux
Esempio n. 2
0
def transitquick_circ_depth(t,p):
    """ The python translation of transitquick.pro. Computes a transit lightcurve as a
        function of time, t, usually in HJD or BJD.
 
      Input parameters (x) are:
      p[0] = tT = transit duration in days
      p[1] = tG = ingress/egress duration in days
      p[2] = D = (R_p/R_*)^2 * I(b)/I(0)= transit depth
      p[3] = u1 = linear limb-darkening parameter
      p[4] = u2 = quadratic limb-darkening coefficient
      p[5] = F0 = uneclipsed flux
      p[6] = Period = calculated in multi_transitquick
      p[7] = T0.TN = Transit time
    """
    
    a5 = -1.0e0*(p[3]+2.0e0*p[4])/(p[4]*np.sqrt(p[0]/p[1]))
    a4 = -1.0e0*(1.0e0-p[3]-p[4])/(p[4]*p[0]/p[1])
    a0 = p[2]*(1e0-p[3]/3e0-p[4]/6e0)/(p[4]*p[0]/p[1])
    RpRs = (tqe.newtraph6(0.3,a5,a4,a0))**2e0
    th = (2e0*np.pi/p[6])*(t-p[7])
    vel = 2e0*np.sqrt(RpRs/(p[0]*p[1]))
    aRs = p[6]*vel/(2e0*np.pi)
    b = (np.sqrt(1e0-(p[0]/p[1])*RpRs))
    inc = np.arccos(b/aRs)

    z0 = aRs*np.sqrt(1e0 - (np.cos(th)*np.sin(inc))**2e0)
    out = tqe.occultquad(z0,p[3],p[4],RpRs)
    flux= out[:][0]*p[5]
    #print RpRs, vel, aRs, b, inc, a5, a4, a0
    return flux