示例#1
0
def get_flat_neurites(neuron, tol=0.1, method='ratio'):
    '''Check if a neuron has neurites that are flat within a tolerance

    Argument:
        neuron : The neuron object to test
        tol : the tolerance or the ratio
        method : way of determining flatness, 'tolerance', 'ratio'

    Returns:
        Bool list corresponding to the flatness check for each neurite
        in neuron neurites with respect to the given criteria
    '''
    return [n for n in neuron.neurites if is_flat(n, tol, method)]
示例#2
0
def test_is_flat():

	neu_tree = load_neuron(os.path.join(SWC_PATH, 'Neuron.swc')).neurites[0]

	nt.assert_false(is_flat(neu_tree, 1e-6, method='tolerance'))
	nt.assert_false(is_flat(neu_tree, 0.1, method='ratio'))
示例#3
0
def test_is_flat():

    neu_tree = load_neuron(os.path.join(SWC_PATH, 'Neuron.swc')).neurites[0]

    nt.assert_false(mt.is_flat(neu_tree, 1e-6, method='tolerance'))
    nt.assert_false(mt.is_flat(neu_tree, 0.1, method='ratio'))
示例#4
0
def test_is_flat():
    neu_tree = load_neuron(Path(SWC_PATH, 'Neuron.swc'))
    assert not mt.is_flat(neu_tree.neurites[0], 1e-6, method='tolerance')
    assert not mt.is_flat(neu_tree.neurites[0], 0.1, method='ratio')