Ejemplo n.º 1
0
def test_nonzero_section_lengths_threshold():
    nrn = NEURONS['Neuron.swc']

    ids = nrn_chk.has_all_nonzero_section_lengths(nrn)
    nt.ok_(ids.status)
    nt.ok_(len(ids.info) == 0)

    ids = nrn_chk.has_all_nonzero_section_lengths(nrn, threshold=15.)
    nt.ok_(not ids.status)
    nt.assert_equal(len(ids.info), 84)
Ejemplo n.º 2
0
def test_nonzero_section_lengths_threshold():
    nrn = NEURONS['Neuron.swc']

    ids = nrn_chk.has_all_nonzero_section_lengths(nrn)
    nt.ok_(ids.status)
    nt.ok_(len(ids.info) == 0)

    ids = nrn_chk.has_all_nonzero_section_lengths(nrn, threshold=15.)
    nt.ok_(not ids.status)
    nt.assert_equal(len(ids.info), 84)
Ejemplo n.º 3
0
def test_nonzero_section_lengths_threshold():
    nrn = NEURONS['Neuron.swc']

    ids = nrn_chk.has_all_nonzero_section_lengths(nrn)
    assert ids.status
    assert len(ids.info) == 0

    ids = nrn_chk.has_all_nonzero_section_lengths(nrn, threshold=15.)
    assert not ids.status
    assert len(ids.info) == 84
Ejemplo n.º 4
0
def test_nonzero_section_lengths_good_data():
    files = ['Neuron.swc',
             'Single_apical.swc',
             'Single_basal.swc',
             'Single_axon.swc',
             ]

    for i, nrn in enumerate(_pick(files)):
        ids = nrn_chk.has_all_nonzero_section_lengths(nrn)
        nt.ok_(ids.status)
        nt.ok_(len(ids.info) == 0)
Ejemplo n.º 5
0
def test_nonzero_section_lengths_good_data():
    files = ['Neuron.swc',
             'Single_apical.swc',
             'Single_basal.swc',
             'Single_axon.swc',
             ]

    for i, nrn in enumerate(_pick(files)):
        ids = nrn_chk.has_all_nonzero_section_lengths(nrn)
        assert ids.status
        assert len(ids.info) == 0
Ejemplo n.º 6
0
def test_nonzero_section_lengths_bad_data():
    nrn = NEURONS['Neuron_zero_length_sections.swc']

    ids = nrn_chk.has_all_nonzero_section_lengths(nrn)
    nt.ok_(not ids.status)
    nt.assert_equal(ids.info, [15])
Ejemplo n.º 7
0
def test_nonzero_section_lengths_bad_data():
    nrn = NEURONS['Neuron_zero_length_sections.swc']

    ids = nrn_chk.has_all_nonzero_section_lengths(nrn)
    nt.ok_(not ids.status)
    nt.assert_equal(ids.info, [15])
Ejemplo n.º 8
0
 def time_has_all_nonzero_section_lengths(self):
     nc.has_all_nonzero_section_lengths(self.neuron, threshold=0.0)
Ejemplo n.º 9
0
 def time_has_all_nonzero_section_lengths(self):
     nc.has_all_nonzero_section_lengths(self.neuron, threshold=0.0)
Ejemplo n.º 10
0
def test_nonzero_section_lengths_bad_data():
    nrn = NEURONS['Neuron_zero_length_sections.swc']

    ids = nrn_chk.has_all_nonzero_section_lengths(nrn)
    assert not ids.status
    assert ids.info == [13]