예제 #1
0
def integrand_btz_n(u, tau, n, R, rh, l, pm1, Om, lam, sig, deltaphi=0):
    s_int_fnc = lambda s: lam**2 * fp.exp(-s**2/4/sig**2)\
                * (fp.exp(-fp.j*Om*s) * wightman_btz_n(s,n,R,rh,l,pm1,Om,lam,sig))

    if n != 0 or deltaphi != 0:
        pt1 = fp.mpf(
            mp.acosh(rh**2 / (R**2 - rh**2) *
                     (R**2 / rh**2 * fp.cosh(rh / l *
                                             (deltaphi - 2 * fp.pi * n)) - 1)))
    pt2 = fp.mpf(
        mp.acosh(rh**2 / (R**2 - rh**2) *
                 (R**2 / rh**2 * fp.cosh(rh / l *
                                         (deltaphi - 2 * fp.pi * n)) + 1)))
    uplim = 2 * tau - u

    if n == 0:
        if uplim < pt2:
            output = fp.quad(s_int_fnc, [0, uplim])
        else:
            output = fp.quad(s_int_fnc, [0, pt2]) + fp.quad(
                s_int_fnc, [pt2, uplim])

    else:
        if uplim < pt1:
            output = fp.quad(s_int_fnc, [0, uplim])
        elif uplim < pt2:
            output = fp.quad(s_int_fnc, [0, pt1]) + fp.quad(
                s_int_fnc, [pt1, uplim])
        else:
            output = fp.quad(s_int_fnc,[0,pt1]) + fp.quad(s_int_fnc,[pt1,pt2])\
                        + fp.quad(s_int_fnc,[pt2,uplim])

    output *= fp.exp(-u**2 / 4 / sig**2)
    return output
예제 #2
0
def Pdot_n(tau, n, R, rh, l, pm1, Om, lam, sig, deltaphi=0, eps=1e-6):
    if n == 0:
        if deltaphi == 0:
            lim2 = fp.mpf(mp.acosh(mp.mpf(rh**2/(R**2-rh**2)\
                                          *(R**2/rh**2 * fp.cosh(rh/l * (deltaphi - 2*fp.pi*n)) + 1))))
            #print(lim2)
            fmins = lambda s: integrand_Pdotm_n(s, tau, 0, R, rh, l, pm1, Om,
                                                lam, sig, deltaphi, eps).real
            fplus = lambda s: integrand_Pdotp_n(s, tau, 0, R, rh, l, pm1, Om,
                                                lam, sig, deltaphi, eps).real
            return fp.quad(fmins, [0, tau + 10 * sig]) + fp.quad(
                fplus, [0, lim2]) + fp.quad(fplus, [lim2, tau + 10 * sig])
        else:
            lim1 = fp.mpf(mp.acosh(mp.mpf(rh**2/(R**2-rh**2)\
                                          *(R**2/rh**2 * fp.cosh(rh/l * (deltaphi - 2*fp.pi*n)) - 1))))
            lim2 = fp.mpf(mp.acosh(mp.mpf(rh**2/(R**2-rh**2)\
                                          *(R**2/rh**2 * fp.cosh(rh/l * (deltaphi - 2*fp.pi*n)) + 1))))
            fmins = lambda s: integrand_Pdotm_n(s, tau, 0, R, rh, l, pm1, Om,
                                                lam, sig, deltaphi, 0).real
            fplus = lambda s: integrand_Pdotp_n(s, tau, 0, R, rh, l, pm1, Om,
                                                lam, sig, deltaphi, 0).real
            return fp.quad(fmins,[0,lim1]) + fp.quad(fmins,[lim1,tau+10*sig])\
                   + fp.quad(fplus,[0,lim2]) + fp.quad(fplus,[lim2,tau+10*sig])
    else:
        lim1 = fp.mpf(mp.acosh(mp.mpf(rh**2/(R**2-rh**2)\
                                      *(R**2/rh**2 * fp.cosh(rh/l * (deltaphi - 2*fp.pi*n)) - 1))))
        lim2 = fp.mpf(mp.acosh(mp.mpf(rh**2/(R**2-rh**2)\
                                      *(R**2/rh**2 * fp.cosh(rh/l * (deltaphi - 2*fp.pi*n)) + 1))))
        fmins = lambda s: integrand_Pdotm_n(s, tau, n, R, rh, l, pm1, Om, lam,
                                            sig, deltaphi, 0).real
        fplus = lambda s: integrand_Pdotp_n(s, tau, n, R, rh, l, pm1, Om, lam,
                                            sig, deltaphi, 0).real
        return fp.quad(fmins,[0,lim1]) + fp.quad(fmins,[lim1,tau+10*sig])\
               + fp.quad(fplus,[0,lim2]) + fp.quad(fplus,[lim2,tau+10*sig])
예제 #3
0
def integrand_deltaPdot_n(s, tau, n, R, rh, l, pm1, Om, lam, sig, deltaphi):
    Zm = mp.mpf(rh**2/(R**2-rh**2)\
                *(R**2/rh**2 * fp.cosh(rh/l * (deltaphi - 2*fp.pi*(n+1/2))) - 1))
    Zp = mp.mpf(rh**2/(R**2-rh**2)\
                *(R**2/rh**2 * fp.cosh(rh/l * (deltaphi - 2*fp.pi*(n+1/2))) + 1))
    K = lam**2 * rh / (2 * fp.pi * fp.sqrt(2) * l *
                       fp.sqrt(R**2 - rh**2)) * fp.exp(-tau**2 / 2 / sig**2)
    return K * fp.exp(-(tau-s)**2/2/sig**2) * fp.exp(-fp.j*Om*s)\
             * ( 1/fp.sqrt(Zm + mp.cosh(rh/l/mp.sqrt(R**2-rh**2) * s))\
                - pm1*1/fp.sqrt(Zp + mp.cosh(rh/l/mp.sqrt(R**2-rh**2) * s)) )
예제 #4
0
def fn2(y, n, R, rh, l, pm1, Om, lam, sig):
    K = lam**2 * sig / 2 / fp.sqrt(2 * fp.pi)
    a = (R**2 - rh**2) * l**2 / 4 / sig**2 / rh**2
    b = fp.sqrt(R**2 - rh**2) * Om * l / rh
    Zp = mp.mpf(rh**2 / (R**2 - rh**2) *
                (R**2 / rh**2 * fp.cosh(2 * fp.pi * rh / l * n) + 1))
    if Zp == mp.cosh(y):
        return 0
    elif Zp - fp.cosh(y) > 0:
        return fp.mpf(K * mp.exp(-a * y**2) * mp.cos(b * y) /
                      mp.sqrt(Zp - mp.cosh(y)))
    else:
        return fp.mpf(-K * mp.exp(-a * y**2) * mp.sin(b * y) /
                      mp.sqrt(mp.cosh(y) - Zp))
예제 #5
0
def wightman_btz_n(s, n, R, rh, l, pm1, Om, lam, sig, deltaphi=0, eps=1e-4):
    if n == 0:
        Bm = (R**2 - rh**2) / rh**2
        Bp = (R**2 + rh**2) / rh**2
    else:
        Bm = R**2 / rh**2 * fp.cosh(rh / l * (deltaphi - 2 * fp.pi * n)) - 1
        Bp = R**2 / rh**2 * fp.cosh(rh / l * (deltaphi - 2 * fp.pi * n)) + 1
    Scosh = (R**2 - rh**2) / rh**2 * mp.cosh(rh / l**2 * (s - fp.j * eps))

    #    if s == 0:
    #        return 0
    #    elif Bm == Scosh or Bp == Scosh:
    #        return 0
    #    else:
    return 1/(4*fp.sqrt(2)*fp.pi*l) * (-fp.j/fp.sqrt(2*Bm)/\
              mp.sinh(rh/2/l**2 * (s - fp.j*eps)) - pm1/fp.sqrt(Bp - Scosh))
def P_BTZn(n,R,rh,l,pm1,Om,lam,sig):
    b = fp.sqrt(R**2-rh**2)/l
    lim = 20*sig*rh/b/l**2
    print('limit: ',lim)
    Zm = fp.mpf(1) #rh**2/(R**2-rh**2)*(R**2/rh**2 * fp.cosh(2*fp.pi*rh/l * n) - 1)
    Zp = rh**2/(R**2-rh**2)*(R**2/rh**2 * fp.cosh(2*fp.pi*rh/l * n) + 1)
    print('Zm: ',Zm, 'Zp: ',Zp, 'acosh(Zp): ', fp.mpf(mp.acosh(Zp)))
    #print(Zm,fp.acosh(Zm))
#    plt.figure()
#    xaxis = fp.linspace(0,lim/5,50)
#    yaxis = [f02(x,n,R,rh,l,pm1,Om,lam,sig) for x in xaxis]
#    plt.plot(xaxis,yaxis)
#    plt.show()
    if pm1==-1 or pm1==1 or pm1==0:
        if n==0:
            return 0\
                 - fp.quad(lambda x: f02(x,n,R,rh,l,pm1,Om,lam,sig),[0,fp.mpf(mp.acosh(Zp))])\
                 - fp.quad(lambda x: f02(x,n,R,rh,l,pm1,Om,lam,sig),[fp.mpf(mp.acosh(Zp)),lim])
                 #fp.quad(lambda x: f01(x,n,R,rh,l,pm1,Om,lam,sig),[-fp.inf,fp.inf])
#        else:
#            if fp.cosh(lim) < Zm or Zm < 1:
#                return fp.quad(lambda x: fn1(x,n,R,rh,l,pm1,Om,lam,sig)\
#                                      - fn2(x,n,R,rh,l,pm1,Om,lam,sig),[0,lim])
#            else:
#                return fp.quad(lambda x: fn1(x,n,R,rh,l,pm1,Om,lam,sig)\
#                                      - fn2(x,n,R,rh,l,pm1,Om,lam,sig),[0,fp.mpf(mp.acosh(Zm))])\
#                     - fp.quad(lambda x: fn1(x,n,R,rh,l,pm1,Om,lam,sig)\
#                                      - fn2(x,n,R,rh,l,pm1,Om,lam,sig),[fp.mpf(mp.acosh(Zm)),lim])
    else:
        print("Please enter a value of 1, -1, or 0 for pm1.")
예제 #7
0
def P_BTZn(n, R, rh, l, pm1, Om, lam, sig):
    b = fp.sqrt(R**2 - rh**2) / l
    lim = 20 * sig * rh / b / l**2
    #Zp = mp.mpf(rh**2/(R**2-rh**2)*(R**2/rh**2 * fp.cosh(2*fp.pi*rh/l * n) + 1))
    #print('Zm: ',Zm, 'Zp: ',Zp)
    #print(Zm,fp.acosh(Zm))
    if pm1 == -1 or pm1 == 1 or pm1 == 0:
        if n == 0:
            return fp.quad(lambda x: f01(x, n, R, rh, l, pm1, Om, lam, sig),
                           [-fp.inf, fp.inf])
        else:
            Zm = rh**2 / (R**2 - rh**2) * (
                R**2 / rh**2 * fp.cosh(2 * fp.pi * rh / l * n) - 1)
            if fp.cosh(lim) < Zm or Zm < 1:
                return fp.quad(lambda x: fn1(x,n,R,rh,l,pm1,Om,lam,sig)\
                                      - fn2(x,n,R,rh,l,pm1,Om,lam,sig),[0,lim])
            else:
                return fp.quad(lambda x: fn1(x,n,R,rh,l,pm1,Om,lam,sig)\
                                      - fn2(x,n,R,rh,l,pm1,Om,lam,sig),[0,fp.mpf(mp.acosh(Zm))])\
                     - fp.quad(lambda x: fn1(x,n,R,rh,l,pm1,Om,lam,sig)\
                                      - fn2(x,n,R,rh,l,pm1,Om,lam,sig),[fp.mpf(mp.acosh(Zm)),lim])
    else:
        print("Please enter a value of 1, -1, or 0 for pm1.")
예제 #8
0
def gammap_btz_n(s, n, R, rh, l, deltaphi, eps):
    Zp = mp.mpf(rh**2 / (R**2 - rh**2) *
                (R**2 / rh**2 * fp.cosh(rh / l *
                                        (deltaphi - 2 * fp.pi * n)) + 1))
    return Zp - mp.cosh(rh / l / mp.sqrt(R**2 - rh**2) * (s - fp.j * eps))