tidy3d.plugins.design.ParameterInt#
- class ParameterInt[source]#
- Bases: - ParameterNumeric- Parameter containing integers. - 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 (str) โ Unique name for the variable. Used as a key into the parameter sweep results. 
- values (Optional[Tuple[Any, ...]] = None) โ If specified, the parameter scan uses these values for grid search methods. 
- span (Tuple[int, int]) โ - (min, max)range within which are allowed values for the variable. The- minvalue is inclusive and the- maxvalue is exclusive. In other words, a grid search over this variable will iterate over- np.arange(min, max).
 
 - Example - >>> import tidy3d.plugins.design as tdd >>> var = tdd.ParameterInt(name="x", span=(1, 4)) - 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. - Inherited Common Usage - span#
 - __hash__()#
- Hash method.