def function_a20(self, m, n, l):
     cv_l = get_cv(m, l, self.c1, self.particle.type)
     cv_n = get_cv(m, n, self.c2, self.particle.type)
     return lambda nu: conjugate(spheroidal.get_a_function(m,n,self.c2,cv_n,1,self.particle)(nu)) *\
                       spheroidal.get_a_function(m,l,self.c1,cv_l,1,self.particle)(nu) +\
                       conjugate(spheroidal.get_c_function(m,n,self.c2,cv_n,1,self.particle)(nu)) *\
                       spheroidal.get_b_function(m,l,self.c1,cv_l,1,self.particle)(nu)
 def function_a20(self,m, n, l):
     cv_l = get_cv(m, l, self.c1, self.particle.type)
     cv_n = get_cv(m, n, self.c2, self.particle.type)
     return lambda nu: conjugate(spheroidal.get_a_function(m,n,self.c2,cv_n,1,self.particle)(nu)) *\
                       spheroidal.get_a_function(m,l,self.c1,cv_l,1,self.particle)(nu) +\
                       conjugate(spheroidal.get_c_function(m,n,self.c2,cv_n,1,self.particle)(nu)) *\
                       spheroidal.get_b_function(m,l,self.c1,cv_l,1,self.particle)(nu)
Beispiel #3
0
    def get_BRi(self):
        Br = zeros((self.nmax, self.nmax), dtype=complex)
        type = self.particle.type
        m = 1
        for i in range(self.nmax):
            for k in range(self.nmax):
                n = i + m
                l = k + m
                cv_l = get_cv(m, l, self.c2, type)
                cv_n = get_cv(m, n, self.c1, type)
                func = lambda nu: (spheroidal.get_a_function(m, l, self.c2, cv_l, 1, self.particle)(nu) * \
                                  spheroidal.get_b_function(m, n, self.c1, cv_n, 1, self.particle)(nu) - \
                                  spheroidal.get_c_function(m, l, self.c2, cv_l, 1, self.particle)(nu) * \
                                  spheroidal.get_a_function(m, n, self.c1, cv_n, 1, self.particle)(nu)) * spheroidal.metric_phi(nu, self.particle)\
                                  * spheroidal.get_integral_metric(self.particle)(nu)

                Br[i][k] = spheroidal.quad(func, -1, 1)
        return -1j * mat(Br)
    def get_BRi(self):
        Br = zeros((self.nmax, self.nmax), dtype=complex)
        type = self.particle.type
        m = 1
        for i in range(self.nmax):
            for k in range(self.nmax):
                n = i + m
                l = k + m
                cv_l = get_cv(m, l, self.c2, type)
                cv_n = get_cv(m, n, self.c1, type)
                func = lambda nu: (spheroidal.get_a_function(m, l, self.c2, cv_l, 1, self.particle)(nu) * \
                                  spheroidal.get_b_function(m, n, self.c1, cv_n, 1, self.particle)(nu) - \
                                  spheroidal.get_c_function(m, l, self.c2, cv_l, 1, self.particle)(nu) * \
                                  spheroidal.get_a_function(m, n, self.c1, cv_n, 1, self.particle)(nu)) * spheroidal.metric_phi(nu, self.particle)\
                                  * spheroidal.get_integral_metric(self.particle)(nu)

                Br[i][k] = spheroidal.quad(func, -1, 1)
        return  -1j * mat(Br)
 def get_A(self, c2,c1,rank):
     A = zeros((self.nmax, self.nmax),dtype=complex)
     type = self.particle.type
     m = 1
     for i in range(self.nmax):
         for k in range(self.nmax):
             l = i + m
             n = k + m
             cv_l = get_cv(m, l, c2, type)
             cv_n = get_cv(m, n, c1, type)
             if (self.particle.spheroid):
                 func = lambda nu: ang1_cv(m, l, c2, cv_l, type, nu)[0] * ang1_cv(m, n, c1, cv_n, type, nu)[0]
                 A[i][k] = spheroidal.quad(func, -1, 1) * rad_cv(m, l, c2, type, rank, self.particle.psi)[0]
             else:
                 func = lambda nu: spheroidal.get_a_function(m, l, c2, rank, self.particle)(nu) * ang1_cv(m, n, c1, cv_n, type, nu)[0]
                 A[i][k] = spheroidal.quad(func, -1, 1)
     return mat(A)
 def get_A(self, c2, c1, rank):
     A = zeros((self.nmax, self.nmax), dtype=complex)
     type = self.particle.type
     m = 1
     for i in range(self.nmax):
         for k in range(self.nmax):
             l = i + m
             n = k + m
             cv_l = get_cv(m, l, c2, type)
             cv_n = get_cv(m, n, c1, type)
             if (self.particle.spheroid):
                 func = lambda nu: ang1_cv(m, l, c2, cv_l, type, nu)[
                     0] * ang1_cv(m, n, c1, cv_n, type, nu)[0]
                 A[i][k] = spheroidal.quad(func, -1, 1) * rad_cv(
                     m, l, c2, type, rank, self.particle.psi)[0]
             else:
                 func = lambda nu: spheroidal.get_a_function(
                     m, l, c2, rank, self.particle)(nu) * ang1_cv(
                         m, n, c1, cv_n, type, nu)[0]
                 A[i][k] = spheroidal.quad(func, -1, 1)
     return mat(A)