neurots.generate.soma¶
NeuroTS class: Soma.
Classes
|
NeuroTS soma data structure. |
|
Soma class. |
- class neurots.generate.soma.Soma(center, radius, points=None)¶
Bases:
object
NeuroTS soma data structure.
It contains the soma points and radius.
- Parameters
center (numpy.ndarray) – The center of the soma.
radius (float) – The radius of the soma.
points (list[list[float]], optional) – An iterable of 3D points.
- property center¶
Get the center.
- contour_point(point)¶
Create a contour point from a given point.
Keeps the x-y coordinates of the input point but replaces the third (z) coordinate with the equivalent soma-z in order to create a contour at the soma level.
- orientation_from_point(point)¶
Return the orientation from the soma center to a point on the soma surface.
- point_from_trunk_direction(phi, theta)¶
Return the coordinates of a point on the soma surface from the given theta, phi angles.
- property points¶
Return the points list.
- class neurots.generate.soma.SomaGrower(soma, context=None, rng=numpy.random)¶
Bases:
object
Soma class.
- Parameters
soma (Soma) – The soma that will grow.
context (Any) – The context used for the section.
rng (numpy.random.Generator) – The random number generator to use.
- add_points_from_orientations(vectors)¶
Generate points on the soma surface from a list of unit vectors.
- add_points_from_trunk_absolute_orientation(orientation, trunk_absolute_angles, z_angles)¶
Generate points on the soma surface from a direction and a list of angles.
- add_points_from_trunk_angles(trunk_angles, z_angles, phi_interval=None)¶
Generate points on the soma surface from a list of angles.
- Parameters
- Returns
The new points.
- Return type
- build(method='contour')¶
Generates a soma, depending on the method used.
The points will be saved into the neuron object and consist the first section of the cell. If interpolation is selected points will be generated until the expected number of soma points is reached.
- interpolate(points, interpolation=10)¶
Return the interpolation points on the convex hull.
Finds the convex hull from a list of points and returns a number of interpolation points that belong on this convex hull.