tidy3d.plugins.design.MethodGrid

tidy3d.plugins.design.MethodGrid#

class MethodGrid[source]#

Bases: MethodSample

Select parameters uniformly on a grid. Size of the grid is specified by the parameter type, either as the number of unique discrete values (ParameterInt, ParameterAny) or with the num_points argument (ParameterFloat).

Parameters:
  • name (Optional[str] = None) – Optional name for the sweep method.

  • filter_func (Optional[Callable[..., bool]] = None) – Optional callback called as filter_func(**sample) for each sampled parameter combination. Return True to keep the sample or False to skip it.

Example

>>> import tidy3d.plugins.design as tdd
>>> method = tdd.MethodGrid()

Attributes

filter_func

name

Methods

sample(parameters)

Defines how the design parameters are sampled on the grid.

static sample(parameters)[source]#

Defines how the design parameters are sampled on the grid.