def trunk_origin_elevations(nrn, neurite_type=NeuriteType.all):
neurite_filter = is_type(neurite_type)<EOL>nrns = neuron_population(nrn)<EOL>def _elevation(section, soma):<EOL><INDENT>'''<STR_LIT>'''<EOL>vector = morphmath.vector(section[<NUM_LIT:0>], soma.center)<EOL>norm_vector = np.linalg.norm(vector)<EOL>if norm_vector >= np.finfo(type(norm_vector)).eps:<EOL><INDENT>return np.arcsin(vector[COLS.Y] / norm_vector)<EOL><DEDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>return [_elevation(s.root_node.points, n.soma)<EOL>for n in nrns<EOL>for s in n.neurites if neurite_filter(s)]<EOL>
Get a list of all the trunk origin elevations of a neuron or population

    The elevation is defined as the angle between x-axis and the
    vector defined by (initial tree point - soma center)
    on the x-y half-plane.

    The range of the elevation angle [-pi/2, pi/2] radians