Exemple #1
0
def test_add_points():
    obj = Pnoise([1e3, 1e6, 1e9], [-100, -120, -140])
    obj.add_points([1e2, 1e3, 1e10], [-80, -70, -160])
    assert np.all(obj.fm == [1e2, 1e3, 1e6, 1e9, 1e10])
    assert np.all(obj.ldbc == [-80, -70, -120, -140, -160])
    # Check deep the interpolation
    obj.fm = [1e2, 1e6, 1.1e5, 7e7]
    obj.fm = [1e3, 1e6, 1.1e5,7e7, 1e10]
Exemple #2
0
def test_add_points():
    obj = Pnoise([1e3, 1e6, 1e9], [-100, -120, -140])
    obj.add_points([1e2, 1e3, 1e10], [-80, -70, -160])
    assert np.all(obj.fm == [1e2, 1e3, 1e6, 1e9, 1e10])
    assert np.all(obj.ldbc == [-80, -70, -120, -140, -160])
    # Check deep the interpolation
    obj.fm = [1e2, 1e6, 1.1e5, 7e7]
    obj.fm = [1e3, 1e6, 1.1e5, 7e7, 1e10]
Exemple #3
0
def test_fm_fc_scaling():
    pnobj = Pnoise([1e4, 1e6, 1e8],[-80,-100,-120], fc=2e9)
    pnobj.fc = 20e9
    assert np.all(pnobj.ldbc == [-60,-80,-100])
    pnobj.fm = [1e5, 1e6, 1e7]
    assert np.all(pnobj.ldbc == [-70,-80,-90])
Exemple #4
0
def test_fm_fc_scaling():
    pnobj = Pnoise([1e4, 1e6, 1e8], [-80, -100, -120], fc=2e9)
    pnobj.fc = 20e9
    assert np.all(pnobj.ldbc == [-60, -80, -100])
    pnobj.fm = [1e5, 1e6, 1e7]
    assert np.all(pnobj.ldbc == [-70, -80, -90])