morphogen.optimization.filters

Regularization of density designs: filter, projection and symmetry.

  • Density filter (Bruns and Tortorelli 2001, Bourdin 2001): weighted mean of the design over a ball of radius r with weights r - distance (linear hat), periodic. It sets a minimal length scale and removes checkerboards.

  • Heaviside projection (Wang, Lazarov and Sigmund 2011) of the filtered densities: (tanh(beta eta) + tanh(beta (x - eta))) / (tanh(beta eta) + tanh(beta (1 - eta))), sharper as beta grows (continuation).

  • Symmetry: projection on the designs invariant by the mirror planes of the cell (orthotropic), and by the permutations of the axes (cubic; square in 2D).

The three operators are linear (filter, symmetry) or diagonal (projection), with their transposes applied to sensitivities.

class morphogen.optimization.filters.DensityFilter(shape, radius: float)[source]

Bases: object

Periodic linear-hat filter of radius radius voxels (planar for nz = 1).

transpose(g: ndarray) → ndarray[source]

Transpose of the filter (the kernel mirrored: the same kernel).

morphogen.optimization.filters.heaviside(x, beta: float, eta: float = 0.5)[source]

Smoothed Heaviside projection (identity-like for small beta).

morphogen.optimization.filters.heaviside_derivative(x, beta: float, eta: float = 0.5)[source]

The derivative of the smoothed Heaviside projection (heaviside()) with respect to the density, of sharpness beta and threshold eta; 1 without projection (beta ≤ 0).

class morphogen.optimization.filters.Symmetry(shape, kind: str = 'none')[source]

Bases: object

Projection on the designs invariant by a symmetry group of the cell.

transpose(x: ndarray) → ndarray

Call self as a function.