tidy3d.plugins.design.ParameterFloat#

class ParameterFloat[source]#

Bases: ParameterNumeric

Parameter containing floats.

Parameters:
  • name (Attribute: name) โ€“

    Type

    str

    Default

    Description

    Unique name for the variable. Used as a key into the parameter sweep results.

  • values (Attribute: values) โ€“

    Type

    Optional[Tuple[Any, โ€ฆ]]

    Default

    = None

    Description

    If specified, the parameter scan uses these values for grid search methods.

  • span (Attribute: span) โ€“

    Type

    Tuple[Union[float, int], Union[float, int]]

    Default

    Description

    (min, max) inclusive range within which the variable should be swept.

  • num_points (Attribute: num_points) โ€“

    Type

    Optional[PositiveInt]

    Default

    = None

    Description

    Number of uniform sampling points for this variable. Only used for โ€˜MethodGridโ€™.

Example

>>> import tidy3d.plugins.design as tdd
>>> var = tdd.ParameterFloat(name="x", num_points=10, span=(1, 2.5))

Attributes

Methods

sample_random(num_samples)

Sample this design variable randomly 'num_samples' times.

select_from_01(pts_01)

Select values given a set of points between 0, 1.

num_points#
sample_random(num_samples)[source]#

Sample this design variable randomly โ€˜num_samplesโ€™ times.

select_from_01(pts_01)[source]#

Select values given a set of points between 0, 1.

__hash__()#

Hash method.