tidy3d.plugins.autograd.invdes.make_filter

Contents

tidy3d.plugins.autograd.invdes.make_filter#

class make_filter[source]#

Bases:

Create a filter function based on the specified kernel type and size.

Parameters:
  • radius (Union[float, Tuple[float, ...]] = None) – The radius of the kernel. Can be a scalar or a tuple.

  • dl (Union[float, Tuple[float, ...]] = None) – The grid spacing. Can be a scalar or a tuple.

  • size_px (Union[int, Tuple[int, ...]] = None) – The size of the kernel in pixels for each dimension. Can be a scalar or a tuple.

  • normalize (bool = True) – Whether to normalize the kernel so that it sums to 1.

  • padding (PaddingType = "reflect") – The padding mode to use.

  • filter_type (KernelType) – The type of kernel to create (circular or conic).

Returns:

A function that applies the created filter to an input array.

Return type:

Callable[[np.ndarray], np.ndarray]

Inherited Common Usage