Esempio n. 1
0
def test_hyperbola_yint():
    concentrations = np.array([0, 10, 90])
    delta_y = 1.0
    kd = 10.0
    a, b, c = hyperbola(concentrations, 0.0, delta_y, kd)
    d, e, f = hyperbola(concentrations, 3.8, delta_y, kd)
    for first, second in ((a, d), (b, e), (c, f)):
        assert second - first == pytest.approx(3.8)
Esempio n. 2
0
def test_kd():
    yint = 0.0
    delta_y = 1.0
    kd = 100.0
    for i in np.linspace(0.0, 10000000000000.0, num=1000):
        concentrations = np.array([0.0, 10.0, i])
        a, b, c = hyperbola(concentrations, yint, delta_y, kd)
        assert c < 1
Esempio n. 3
0
def test_hyperbola():
    concentrations = np.array([0, 10, 90])
    yint = 0.0
    delta_y = 1.0
    kd = 10.0
    first, second, third = hyperbola(concentrations, yint, delta_y, kd)
    assert first == 0.0
    assert second == 0.5
    assert third == 0.9
Esempio n. 4
0
def test_limit():
    yint = 0.0
    delta_y = 1.0
    kd = 0.0000001
    for i in np.linspace(20.0, 10000000000000.0, num=1000):
        concentrations = np.array([0.0, 10.0, i])
        a, b, c = hyperbola(concentrations, yint, delta_y, kd)
        assert c < i
        assert c == pytest.approx(1.0)
Esempio n. 5
0
def test_delta_y():
    concentrations = np.array([1.0, 10.0, 90.0])
    yint = 0.0
    kd = 0.0
    for delta_y in (-30, -2.0, -1.0, 0.0, 10.0, 50.0, 1000.0, 10000000.0):
        a, b, c = hyperbola(concentrations, yint, delta_y, kd)
        assert a == delta_y
        assert b == delta_y
        assert c == delta_y