tidy3d.plugins.adjoint.utils.filter.BinaryProjector#

class BinaryProjector[source]#

Bases: Filter

Projects a grayscale image towards min and max values using a smooth tanh function.

Parameters:
  • vmin (Attribute: vmin) –

    Type

    float

    Default

    Description

    Minimum value to project to.

  • vmax (Attribute: vmax) –

    Type

    float

    Default

    Description

    Maximum value to project to.

  • beta (Attribute: beta) –

    Type

    float

    Default

    = 1.0

    Description

    Steepness of the binarization, higher means more sharp transition at the expense of gradient accuracy and ease of optimization. Can be useful to ramp up in a scheduled way during optimization.

  • eta (Attribute: eta) –

    Type

    float

    Default

    = 0.5

    Description

    Halfway point in projection function.

  • strict_binarize (Attribute: strict_binarize) –

    Type

    bool

    Default

    = False

    Description

    If False, the binarization is still continuous between min and max. If false, the values are snapped to the min and max values after projection.

Note

\[v(x) = vmin + (vmax - vmin) \frac{tanh(\beta \eta) + tanh(\beta * (x - \eta))}{tanh(\beta * \eta) + tanh(\beta * (1 - \eta))}\]

Attributes

Methods

evaluate(spatial_data)

Process on supplied spatial data.

vmin#
vmax#
beta#
eta#
strict_binarize#
evaluate(spatial_data)[source]#

Process on supplied spatial data.

__hash__()#

Hash method.