tidy3d.rf.CompositeCurrentIntegralSpec#
- class CompositeCurrentIntegralSpec[source]#
Bases:
MicrowaveBaseModelSpecification for a composite current integral.
- Parameters:
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.
Notes
This class is used to set up a
CompositeCurrentIntegral, which combines multiple current integrals. It does not perform any integration itself.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
Return the overall bounding box of all path specifications.
Methods
plot([x, y, z, ax, plot_arrow])Plot path integral at single (x,y,z) coordinate.
- path_specs#
- sum_spec#
- plot(x=None, y=None, z=None, ax=None, plot_arrow=True, **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.
plot_arrow (bool = True) – Whether to plot the arrow indicating current direction. Default is
True.**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