tidy3d.plugins.invdes.FilterProject#

class FilterProject[source]#

Bases: InvdesBaseModel

Transformation involving convolution by a conic filter followed by a tanh projection.

Parameters:
  • attrs (dict = {}) – Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, attrs are mutable. For example, the following is allowed for setting an attr obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a TypeError if attrs contain objects that can not be serialized. One can check if attrs are serializable by calling obj.json().

  • radius (float) – [units = um]. Radius of the filter to convolve with supplied spatial data. Note: the corresponding feature size expressed in the device is typically sqrt(3) times smaller than the radius. For best results, it is recommended to make your radius about twice as large as the desired feature size. Note: the radius value is often only approximately related to the final feature sizes. It is useful to apply a FilterProject transformation to ‘encourage’ larger feature sizes, but we ultimately recommend creating a ErosionDilationPenalty to the DesignRegion.penalties if you have strict fabrication constraints.

  • beta (float = 1.0) – Steepness of the binarization, higher means more sharp transition at the expense of gradient accuracy and ease of optimization.

  • eta (float = 0.5) – Halfway point in projection function.

  • strict_binarize (bool = False) – If False, the binarization is still continuous between min and max. If True, the values are snapped to the min and max values after projection.

  • image: (..) – ../../_static/img/filter_project.png:

Attributes

attrs

Methods

evaluate(spatial_data, design_region_dl)

Evaluate this transformation on spatial data, given some grid size in the region.

to_filter(design_region_dl)

Get the conic filter associated with this transformation (after supplying grid size).

to_projector()

Get the binary projector associated with this transformation.

Inherited Common Usage

radius#
beta#
eta#
strict_binarize#
to_filter(design_region_dl)[source]#

Get the conic filter associated with this transformation (after supplying grid size).

to_projector()[source]#

Get the binary projector associated with this transformation.

evaluate(spatial_data, design_region_dl)[source]#

Evaluate this transformation on spatial data, given some grid size in the region.

__hash__()#

Hash method.