tidy3d.rf.CompositeCurrentIntegralSpec#
- class CompositeCurrentIntegralSpec[source]#
Bases:
MicrowaveBaseModelSpecification for a composite current integral.
- 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 anattrobj.attrs['foo'] = bar. Also note that Tidy3D will raise aTypeErrorifattrscontain objects that can not be serialized. One can check ifattrsare serializable by callingobj.json().path_specs (Tuple[Union[AxisAlignedCurrentIntegralSpec, Custom2DCurrentIntegralSpec], ...]) – Definition of the disjoint path specifications for each isolated contour integral.
sum_spec (Literal['sum', 'split']) – Determines the method used to combine the currents calculated by the different current integrals defined by
path_specs.sumsimply adds all currents, whilesplitkeeps contributions with opposite phase separate, which allows for isolating the current flowing in opposite directions. Insplitversion, the current returned is the maximum of the two contributions.CompositeCurrentIntegral (This class is used to set up a)
combines (which)
itself. (multiple current integrals. It does not perform any integration)
Example
>>> spec1 = AxisAlignedCurrentIntegralSpec( ... center=(0, 0, 0), size=(1, 1, 0), sign="+" ... ) >>> spec2 = AxisAlignedCurrentIntegralSpec( ... center=(2, 0, 0), size=(1, 1, 0), sign="+" ... ) >>> composite_spec = CompositeCurrentIntegralSpec( ... path_specs=(spec1, spec2), ... sum_spec="sum" ... )
Attributes
Methods
plot([x, y, z, ax])Plot path integral at single (x,y,z) coordinate.
Inherited Common Usage
- path_specs#
- sum_spec#
- plot(x=None, y=None, z=None, ax=None, **path_kwargs)[source]#
Plot path integral at single (x,y,z) coordinate.
- Parameters:
x (float = None) – Position of plane in x direction, only one of x,y,z can be specified to define plane.
y (float = None) – Position of plane in y direction, only one of x,y,z can be specified to define plane.
z (float = None) – Position of plane in z direction, only one of x,y,z can be specified to define plane.
ax (matplotlib.axes._subplots.Axes = None) – Matplotlib axes to plot on, if not specified, one is created.
**path_kwargs – Optional keyword arguments passed to the matplotlib plotting of the line. For details on accepted values, refer to Matplotlib’s documentation.
- Returns:
The supplied or created matplotlib axes.
- Return type:
matplotlib.axes._subplots.Axes
- property bounds#
Return the overall bounding box of all path specifications.
Computed by taking the union of bounds from all path specs.
- Returns:
Tuple of (rmin, rmax) where rmin and rmax are tuples of (x, y, z) coordinates representing the minimum and maximum corners of the bounding box.
- Return type:
Bound
- __hash__()#
Hash method.