tidy3d.plugins.autograd.invdes.GaussianFilter#
- class GaussianFilter[source]#
Bases:
AbstractFilterA Gaussian filter implemented via separable gaussian_filter primitive.
- Parameters:
kernel_size (Union[PositiveInt, tuple[PositiveInt, ...]]) – Size of the kernel in pixels for each dimension.
normalize (bool = True) – Whether to normalize the kernel so that it sums to 1.
padding (Literal['constant', 'edge', 'reflect', 'symmetric', 'wrap'] = reflect) – The padding mode to use.
sigma_scale (NonNegativeFloat = 0.445) – Scale factor mapping radius in pixels to Gaussian sigma.
truncate (NonNegativeFloat = 2.0) – Truncation radius in multiples of sigma passed to
gaussian_filter.
Notes
Padding modes
'constant','edge','reflect','symmetric', and'wrap'are supported. Modes'edge'and'symmetric'are internally mapped to the SciPy equivalents'nearest'and'mirror'respectively. The defaultsigma_scaleof 0.445 was tuned to match the conic kernel when expressed in pixel radius. Thenormalizeflag inherited fromAbstractFilteris ignored because the separable Gaussian implementation always returns a unit-sum kernel; setting it toFalsehas no effect.Attributes
kernel_sizenormalizepaddingMethods
get_kernel(size_px, normalize)Get the kernel for the filter.
- sigma_scale#
- truncate#