コード例 #1
0
ファイル: test_examples.py プロジェクト: nicain/dipde_dev
def test_potjans_diesmann():
    from dipde.examples.cortical_column import example

    result_dict = example(show=False)

    true_ans_dict = {(23,'e'):0.373293157534,
                     (23,'i'):3.18198990435,
                     (4,'e'):4.84559227803,
                     (4,'i'):6.88123163289,
                     (5,'e'):12.4268759126,
                     (5,'i'):11.3345559791,
                     (6,'e'):2.15114563585,
                     (6,'i'):9.4090127714}
    
    for layer in [23, 4, 5, 6]:
        for celltype in ['e', 'i']:

            print result_dict[layer, celltype], true_ans_dict[layer, celltype]
            np.testing.assert_almost_equal(result_dict[layer, celltype], true_ans_dict[layer, celltype],3)
コード例 #2
0
def test_potjans_diesmann():
    from dipde.examples.cortical_column import example

    result_dict = example(show=False)

    true_ans_dict = {
        (23, 'e'): 0.373293157534,
        (23, 'i'): 3.18198990435,
        (4, 'e'): 4.84559227803,
        (4, 'i'): 6.88123163289,
        (5, 'e'): 12.4268759126,
        (5, 'i'): 11.3345559791,
        (6, 'e'): 2.15114563585,
        (6, 'i'): 9.4090127714
    }

    for layer in [23, 4, 5, 6]:
        for celltype in ['e', 'i']:

            print result_dict[layer, celltype], true_ans_dict[layer, celltype]
            np.testing.assert_almost_equal(result_dict[layer, celltype],
                                           true_ans_dict[layer, celltype], 3)
コード例 #3
0
ファイル: test_examples.py プロジェクト: AllenInstitute/dipde
def test_singlepop():
    from dipde.examples.singlepop import example
    t, y = example(show=False)

    np.testing.assert_almost_equal(t[5], .0005)
    np.testing.assert_almost_equal(y[5], .00039095499999999633)
コード例 #4
0
ファイル: test_examples.py プロジェクト: AllenInstitute/dipde
def test_excitatory_inhibitory():
    from dipde.examples.excitatory_inhibitory import example
    t, y = example(show=False)

    np.testing.assert_almost_equal(t[-1], .1)
    np.testing.assert_almost_equal(y[-1], 0.90731622281068436)
コード例 #5
0
ファイル: test_examples.py プロジェクト: AllenInstitute/dipde
def test_singlepop_exponential_distribution():
    from dipde.examples.singlepop_exponential_distribution import example
    t, y = example(show=False)

    np.testing.assert_almost_equal(t[-1], .1)
    np.testing.assert_almost_equal(y[-1], 8.6633532147226759)
コード例 #6
0
ファイル: test_examples.py プロジェクト: AllenInstitute/dipde
def test_singlepop_recurrent():
    from dipde.examples.singlepop_recurrent import example
    t, y = example(show=False)

    np.testing.assert_almost_equal(t[10], .001)
    np.testing.assert_almost_equal(y[100], 1.18954810997)
コード例 #7
0
ファイル: test_examples.py プロジェクト: AllenInstitute/dipde
def test_singlepop_sine():
    from dipde.examples.singlepop_sine import example
    t, y = example(show=False)

    np.testing.assert_almost_equal(t[10], .001)
    np.testing.assert_almost_equal(y[100], 1.8977443953614115)
コード例 #8
0
def test_singlepop():
    from dipde.examples.singlepop import example
    t, y = example(show=False)

    np.testing.assert_almost_equal(t[5], .0005)
    np.testing.assert_almost_equal(y[5], .00039095499999999633)
コード例 #9
0
def test_excitatory_inhibitory():
    from dipde.examples.excitatory_inhibitory import example
    t, y = example(show=False)

    np.testing.assert_almost_equal(t[-1], .1)
    np.testing.assert_almost_equal(y[-1], 0.90731622281068436)
コード例 #10
0
def test_singlepop_exponential_distribution():
    from dipde.examples.singlepop_exponential_distribution import example
    t, y = example(show=False)

    np.testing.assert_almost_equal(t[-1], .1)
    np.testing.assert_almost_equal(y[-1], 8.6633532147226759)
コード例 #11
0
def test_singlepop_recurrent():
    from dipde.examples.singlepop_recurrent import example
    t, y = example(show=False)

    np.testing.assert_almost_equal(t[10], .001)
    np.testing.assert_almost_equal(y[100], 1.18954810997)
コード例 #12
0
def test_singlepop_sine():
    from dipde.examples.singlepop_sine import example
    t, y = example(show=False)

    np.testing.assert_almost_equal(t[10], .001)
    np.testing.assert_almost_equal(y[100], 1.8977443953614115)
コード例 #13
0
def test_excitatory_inhibitory():
    from dipde.examples.excitatory_inhibitory import example
    t, y = example(show=False)

    np.testing.assert_almost_equal(t[-1], .1)
    np.testing.assert_almost_equal(y[-1], 0.90725590501763964)
コード例 #14
0
def test_singlepop():
    from dipde.examples.singlepop import example
    t, y = example(show=False)

    np.testing.assert_almost_equal(t[5], .0005)
    np.testing.assert_almost_equal(y[5], 0.00038097003623592236)
コード例 #15
0
ファイル: test_examples.py プロジェクト: nicain/dipde_dev
def test_excitatory_inhibitory():
    from dipde.examples.excitatory_inhibitory import example
    t, y = example(show=False)

    np.testing.assert_almost_equal(t[-1], .1)
    np.testing.assert_almost_equal(y[-1], 0.90725590501763964)