def test_interrelations_kh2_bessel(self): n = 8 x = 1.464478579484278 left = np.complex(sph_kn_bessel(n, x)) right = np.complex(-pi / 2 * mpc(0, 1)**(-n) * sph_h2n_bessel(n, -1j * x)) assert_allclose(left, right)
def test_interrelations_k_bessel(self): n = 7 x = 5.746161870059113 left = np.complex(sph_kn_bessel(n, x)) right = np.complex((-1)**(n + 1) * pi / 2 * (sph_i1n_bessel(n, x) - sph_i2n_bessel(n, x))) assert_allclose(left, right)
def test_interrelations_kh2_bessel(self): n = 8 x = 1.464478579484278 left = np.complex(sph_kn_bessel(n, x)) right = np.complex(-pi / 2 * mpc(0, 1) ** (-n) * sph_h2n_bessel(n, -1j * x)) assert_allclose(left, right)
def test_interrelations_kh1_bessel(self): n = 4 x = 4.403387573037941 left = np.complex(sph_kn_bessel(n, x)) right = np.complex(-pi / 2 * mpc(0, 1) ** n * sph_h1n_bessel(n, 1j * x)) assert_allclose(left, right)
def test_interrelations_k_bessel(self): n = 7 x = 5.746161870059113 left = np.complex(sph_kn_bessel(n, x)) right = np.complex((-1) ** (n + 1) * pi / 2 * (sph_i1n_bessel(n, x) - sph_i2n_bessel(n, x))) assert_allclose(left, right)
def test_sph_k2_bessel(self): x = 12.806013305135048 desired = (1 / x + 3 / x ** 2 + 3 / x ** 3) * np.exp(-x) * np.pi / 2 actual = np.complex(sph_kn_bessel(2, x)) assert_allclose(actual, desired)
def test_sph_k1_bessel(self): x = 8.853399925289201 desired = (1 / x + 1 / x ** 2) * np.exp(-x) * np.pi / 2 actual = np.complex(sph_kn_bessel(1, x)) assert_allclose(actual, desired)
def test_sph_k0_bessel(self): x = 7.547480927635526 desired = np.pi * np.exp(-x) / (2 * x) actual = np.complex(sph_kn_bessel(0, x)) assert_allclose(actual, desired)
def test_interrelations_kh1_bessel(self): n = 4 x = 4.403387573037941 left = np.complex(sph_kn_bessel(n, x)) right = np.complex(-pi / 2 * mpc(0, 1)**n * sph_h1n_bessel(n, 1j * x)) assert_allclose(left, right)
def test_sph_k2_bessel(self): x = 12.806013305135048 desired = (1 / x + 3 / x**2 + 3 / x**3) * np.exp(-x) * np.pi / 2 actual = np.complex(sph_kn_bessel(2, x)) assert_allclose(actual, desired)
def test_sph_k1_bessel(self): x = 8.853399925289201 desired = (1 / x + 1 / x**2) * np.exp(-x) * np.pi / 2 actual = np.complex(sph_kn_bessel(1, x)) assert_allclose(actual, desired)