Example #1
0
 def j2(self,x):
     """
     spherical bessel l=2
     """
     return M.choose(M.greater(x,0.001),(x**2/15.0,((M.cos(x) * -3. / x -
                  M.sin(x) * (1. - 3. /x**2))/x)))
     return 
Example #2
0
 def j1(self,x):
     """
     spherical bessel l=1
     """
     return M.choose(M.greater(x,0.001),(x/3.0,(M.sin(x)/x - M.cos(x))/x))
Example #3
0
 def j0(self,x):
     """
     spherical bessel l=0
     """
     return M.choose(M.greater(x,0.001),(1.0-x**2/6.0,M.sin(x)/x))