Ejemplo n.º 1
0
def nonzero_section_lengths(neuron, threshold=0.0):
    '''Check presence of neuron sections with length not above threshold

    Arguments:
        neuron: Neuron object whose segments will be tested
        threshold: value above which a section length is considered to be non-zero
    Return: list of ids of first point in bad sections
    '''
    l = [[s for s in val_iter(isection(t)) if section_length(s) <= threshold]
         for t in neuron.neurites]
    return [i[0][COLS.ID] for i in chain(*l)]
Ejemplo n.º 2
0
def nonzero_section_lengths(neuron, threshold=0.0):
    '''Check presence of neuron sections with length not above threshold

    Arguments:
        neuron: Neuron object whose segments will be tested
        threshold: value above which a section length is considered to be non-zero
    Return: list of ids of first point in bad sections
    '''
    l = [[s for s in val_iter(isection(t))
          if section_length(s) <= threshold]
         for t in neuron.neurites]
    return [i[0][COLS.ID] for i in chain(*l)]
Ejemplo n.º 3
0
def length(section):
    '''Return the length of a section'''
    return mm.section_length(section)