morphogen.models.lattice¶
Strut (beam) lattices: periodic arrangements of cylindrical struts.
- morphogen.models.lattice.unit_cell_struts(cell: str) ndarray[source]¶
Struts of a unit cell in fractional coordinates, shape (n, 2, 3).
- morphogen.models.lattice.lattice_struts(cell: str, cell_size: float, lower, upper) tuple[ndarray, ndarray][source]¶
All struts of the lattice anchored at the origin whose cells meet [lower, upper].
- morphogen.models.lattice.lattice_fraction(cell: str, radius: float, n: int | None = None) float[source]¶
Solid volume fraction of a lattice of unit cell size 1 (voxel estimate).
- morphogen.models.lattice.strut_fraction(cell: str, r: float, t: float = 0.0, n: int | None = None) float[source]¶
Solid fraction of a lattice of unit cell size 1, struts of radius
rhollow with wallst(0: solid): the union of the struts minus that of their bores. Exact for the cubic cell, a voxel estimate onn^3voxels otherwise (default: 8 voxels across the walls of hollow struts, 10 across the radius of solid ones).
- morphogen.models.lattice.strut_radius(cell: str, target: float, t: float = 0.0) float[source]¶
Radius of the struts (unit cell size) of a lattice of solid fraction
target, hollow with wallst. The fraction of solid struts grows with their radius; that of hollow struts peaks once their bores start to fill the cell: the radius is taken below the peak.
- class morphogen.models.lattice.StrutLattice(cell: str = 'octet', cell_size: float = 1.0, strut_radius: float | None = None, volume_fraction: float | None = None, wall_thickness: float | None = None, rotation: tuple[float, ...] | None = None, radius_gradient: tuple[float, ...] | None = None, gradient_axis: int = 0, *, anisotropy: Anisotropy | None = None)[source]¶
Bases:
ModelLattice of cylindrical struts with spherical nodes (spherocylinders).
Cells:
cubic(cube edges),bcc(body diagonals),fcc(face diagonals),octet(face diagonals and inner octahedron),kelvin(edges of the Kelvin foam: truncated octahedra on a bcc lattice, 24 struts per cell). Give the strut radius or the target relative density (solid volume fraction). Withwall_thickness, the struts are hollow tubes: their union minus the union of their bores (which join at the nodes).In non-periodic domains, the lattice may be turned (
rotation: Bunge angles of its axes in those of the sample; it is then anchored at the centre of the domain) and graded: withradius_gradient(the radii at the lower and upper faces of the domain alonggradient_axis), each strut takes the radius interpolated linearly at its midpoint, a functionally graded lattice.- phases: ClassVar[dict[int, str]] = {0: 'void', 1: 'struts'}¶
Meaning of the phase indices of the voxel images.
- count_label: ClassVar[str] = 'unit cells'¶
Objects counted by
expected_count()(fibres, spheres, cells…).
- property radius: float¶
Strut radius (solved numerically from the volume fraction if needed; the mean of the gradient of a graded lattice).
- generate(domain: Domain, seed: int | SeedSequence | Generator | None = None) PrimitiveUnion[source]¶
One realization of the model in
domain.