def j_l(l, k): """Spherical bessel.""" if l == 0: l1 = 1 else: l1 = l _, j_l, _, _, _ = csphjy(l1, k) return j_l[l]
def j_l(l, x): """ The Spherical Bessel function j_l. Reference: http://en.wikipedia.org/wiki/Bessel_function#Spherical_Bessel_functions:_jn.2C_yn """ L = 1 if l == 0 else l _, j_l, _, _, _ = csphjy(L, x) return j_l[l]