tidy3d.plugins.autograd.invdes.ErosionDilationPenalty#

class ErosionDilationPenalty[source]#

Bases: Tidy3dBaseModel

A class that computes a penalty for erosion/dilation of a parameter map not being unity.

Parameters:
  • radius (Union[float, tuple[float, ...]]) – The radius of the kernel.

  • dl (Union[float, tuple[float, ...]]) – The grid spacing.

  • size_px (Optional[Union[int, tuple[int, ...]]] = None) – The size of the kernel in pixels.

  • beta (NonNegativeFloat = 20.0) – The beta parameter for the tanh projection.

  • eta (NonNegativeFloat = 0.5) – The eta parameter for the tanh projection.

  • filter_type (str = conic) – The type of filter to create.

  • padding (Literal['constant', 'edge', 'reflect', 'symmetric', 'wrap'] = reflect) – The padding mode to use.

  • delta_eta (float = 0.01) – The binarization threshold for erosion and dilation operations.

Attributes

radius#
dl#
size_px#
beta#
eta#
filter_type#
padding#
delta_eta#