tyssue.particles package¶
Submodules¶
tyssue.particles.point_cloud module¶
Utilities to generate point clouds
The positions of the points are generated along the architecture of the epithelium.
-
class
tyssue.particles.point_cloud.
EdgeSubdiv
(edge_df, **kwargs)[source]¶ Bases:
object
Container class to ease discretisation along the edges
Creates an indexer and an offset array to ease discretisation along the edges.
- Parameters
edge_df (pd.DataFrame,) –
parameters (Keyword) –
------------------ –
density (number of points per edge) –
-
upcaster
¶ edge indices repeated to match the lookup table
- Type
np.ndarray, shape (Np,)
-
offset
¶ piecewise linear offset along the edges, such that ::math:M_{ij}^n = offset[n]*r_{ij}:
- Type
np.ndarray, shape (Np,)
-
edge_point_cloud
(srce_pos, r_ij, offset_modulation=None, modulation_kwargs=None, coords=['x', 'y', 'z'], dcoords=['dx', 'dy', 'dz'])[source]¶ Generates a point cloud along the edges of the epithelium.
if a offset_modulation function is provided, it is used to transform the offsets
- Parameters
srce_pos (DataFrame of shape (self.Ne, ndim)) – with the origins of the points for each edge (usually the edge upcasted source vertex)
r_ij (DataFrame of shape (self.Ne, ndim)) – the edge vector coordiantes
offset_modulation (function of self returning) – an array with shape (self.Np,) containing the modified offsets. self.points[‘offset’] is used by default.
modulation_kwargs (keyword arguments to the modulation) – function
- Returns
points
- Return type
(Np, 3) pd.DataFrame with the points positions
-
static
from_eptm_edges
(eptm, **kwargs)[source]¶ Creates an EdgeSubdiv instance and computes the point grid allong the edges from the source vertex to its target. :returns: subdiv :rtype: a
EdgeSubdiv
instance
-
update_offset_lut
(offset_lut=None)[source]¶ Updates the density lookup table function.
The offset_lut can be any function with a single num argument
- Parameters
offset_lut (function, default None,) – edge-wise function of the number of points giving the offset positions
is a shifted regular grid (Default) –
`np.arange(0.5 –
/ num` (num+0.5)) –
-
update_particles
()[source]¶ Updates the number of particles per edge from edges length
and density values: num_particles = length * density * Also updates the self.points df
Module contents¶
Epithelium subsegmentation system