Ejemplo n.º 1
0
def test_get_nonmonotonic_neurites():

    n = load_neuron(os.path.join(SWC_PATH, 'Neuron.swc'))

    nt.assert_equal(len(mt.get_nonmonotonic_neurites(n)), 4)

    _make_monotonic(n)

    nt.assert_equal(len(mt.get_nonmonotonic_neurites(n)), 0)
Ejemplo n.º 2
0
def test_get_nonmonotonic_neurites():

    n = load_neuron(os.path.join(SWC_PATH, 'Neuron.swc'))

    nt.assert_equal(len(mt.get_nonmonotonic_neurites(n)), 4)

    _make_monotonic(n)

    nt.assert_equal(len(mt.get_nonmonotonic_neurites(n)), 0)
Ejemplo n.º 3
0
def has_all_monotonic_neurites(neuron, tol=1e-6):
    '''Check that a neuron has no neurites that are not monotonic

    Argument:
        neuron : The neuron object to test
        tol : the tolerance for testing monotonicity
    '''
    return CheckResult(len(get_nonmonotonic_neurites(neuron, tol)) == 0)
Ejemplo n.º 4
0
def has_all_monotonic_neurites(neuron, tol=1e-6):
    '''Check that a neuron has only neurites that are monotonic

    Arguments:
        neuron(Neuron): The neuron object to test
        tol(float): tolerance

    Returns:
        CheckResult with result
    '''
    return CheckResult(len(get_nonmonotonic_neurites(neuron, tol)) == 0)
Ejemplo n.º 5
0
def has_all_monotonic_neurites(neuron, tol=1e-6):
    '''Check that a neuron has only neurites that are monotonic

    Arguments:
        neuron(Neuron): The neuron object to test
        tol(float): tolerance

    Returns:
        CheckResult with result
    '''
    return CheckResult(len(get_nonmonotonic_neurites(neuron, tol)) == 0)
Ejemplo n.º 6
0
def test_get_nonmonotonic_neurites():
    n = load_neuron(Path(SWC_PATH, 'Neuron.swc'))
    assert len(mt.get_nonmonotonic_neurites(n)) == 4
    _make_monotonic(n)
    assert len(mt.get_nonmonotonic_neurites(n)) == 0