tidy3d.plugins.design.method.Method#
- class Method[source]#
- Bases: - Tidy3dBaseModel,- ABC- Spec for a sweep algorithm, with a method to run it. - 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, - attrsare mutable. For example, the following is allowed for setting an- attr- obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a- TypeErrorif- attrscontain objects that can not be serialized. One can check if- attrsare serializable by calling- obj.json().
- name (Optional[str] = None) โ Optional name for the sweep method. 
 
 - Attributes - Methods - assert_hashable(fn_args)- Raise error if the function arguments aren't hashable (do before computation). - run(parameters,ย fn)- Defines the search algorithm (sequential). - sample(parameters,ย **kwargs)- Defines how the design parameters are sampled. - Inherited Common Usage - name#
 - static assert_hashable(fn_args)[source]#
- Raise error if the function arguments arenโt hashable (do before computation). 
 - __hash__()#
- Hash method.