tidy3d.plugins.autograd.utilities.get_kernel_size_px

tidy3d.plugins.autograd.utilities.get_kernel_size_px#

class get_kernel_size_px[source]#

Bases:

Calculate the kernel size in pixels based on the provided radius and grid spacing.

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

  • dl (Union[float, Iterable[float]] = None) – The grid spacing. Can be a scalar or an iterable of floats.

Returns:

The size of the kernel in pixels for each dimension. Returns an integer if the radius is scalar, otherwise a list of integers.

Return type:

Union[int, List[int]]

Raises:

ValueError – If either ‘radius’ or ‘dl’ is not provided.

Inherited Common Usage