コード例 #1
0
def integrandof_Xn_plus(y, n, RA, RB, rh, l, pm1, Om, lam, tau0, width,
                        deltaphi, isP):
    bA = mp.sqrt(RA**2 - rh**2) / l
    bB = mp.sqrt(RB**2 - rh**2) / l
    return fp.j*4 * fp.exp(-fp.j*Om*(bB+bA)*(tau0+width/2))/(Om*(bB+bA))\
            * fp.cos( Om/2*(bB+bA)*(y-width) ) * fp.cos(Om/2*(bB-bA)*y)\
            * g_n2(y,n,RA,RB,rh,l,pm1,deltaphi,isP)
コード例 #2
0
def f02(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((R**2+rh**2)/(R**2-rh**2))
    if Zp == mp.cosh(y):
        print("RIP MOM PLSSS")
    #print(Zp, y, fp.cosh(y))
    if Zp - mp.cosh(y) > 0:
        return K * fp.exp(-a*y**2) * fp.cos(b*y) / fp.mpf(mp.sqrt(Zp - mp.cosh(y)))
    elif Zp - mp.cosh(y) < 0:
        return -K * fp.exp(-a*y**2) * fp.sin(b*y) / fp.mpf(mp.sqrt(mp.cosh(y) - Zp))
    else:
        return 0
コード例 #3
0
 def g(theta, phi):
     R = abs(fp.re(fp.spherharm(l, m, theta, phi)))
     x = R * fp.cos(phi) * fp.sin(theta)
     y = R * fp.sin(phi) * fp.sin(theta)
     z = R * fp.cos(theta)
     return [x, y, z]
コード例 #4
0
ファイル: spherharm44.py プロジェクト: 2t7/mpmath
 def g(theta,phi):
     R = abs(fp.re(fp.spherharm(l,m,theta,phi)))
     x = R*fp.cos(phi)*fp.sin(theta)
     y = R*fp.sin(phi)*fp.sin(theta)
     z = R*fp.cos(theta)
     return [x,y,z]
コード例 #5
0
def f(x, RA, RB):
    bA = mp.sqrt(RA**2 - rh**2) / l
    bB = mp.sqrt(RB**2 - rh**2) / l
    return fp.cos(Om / 2 * (bB + bA) * (x - width)) * fp.cos(Om / 2 *
                                                             (bB - bA) * x)