def test_b(): bc = data.b_coherent(621490) bi = data.b_incoherent('SM149') assert_equal(data.b('SM149'), math.sqrt(abs(bc)**2 + abs(bi)**2))
def test_b_incoherent(): assert_equal(data.b_incoherent('PD105'), -2.6E-13 + 0j) assert_equal(data.b_incoherent(621490), 3.14E-12 - 1.03E-12j)
def test_b_incoherent(): assert_equal(data.b_incoherent("PD105"), -2.6e-13 + 0j) assert_equal(data.b_incoherent(621490), 3.14e-12 - 1.03e-12j)
def test_b(): bc = data.b_coherent(621490) bi = data.b_incoherent('SM149') assert_equal(data.b('SM149'), math.sqrt(abs(bc) ** 2 + abs(bi) ** 2))