tidy3d.plugins.smatrix.Port#
- class Port[source]#
Bases:
AbstractPortSpecifies a modal port for S-matrix calculation.
- Parameters:
center (Optional[tuple[Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box]]] = None) – [units = um]. Center of object in x, y, and z.
size (tuple[Union[NonNegativeFloat, autograd.tracer.Box], Union[NonNegativeFloat, autograd.tracer.Box], Union[NonNegativeFloat, autograd.tracer.Box]]) – [units = um]. Size in x, y, and z directions.
name (str) – Unique name for the port.
direction (Literal['+', '-']) – ‘+’ or ‘-’, defining which direction is considered ‘input’.
mode_spec (
ModeSpec= ModeSpec()) – Specifies how the mode solver will solve for the modes of the port.
Attributes
Methods
to_monitor(freqs)Create a ModeMonitor matching this modal port.
to_source(freq0, fwidth, mode_index[, ...])Create a ModeSource matching this modal port.
- mode_spec#
- to_source(freq0, fwidth, mode_index, num_freqs=1, source_time=None, **kwargs)[source]#
Create a ModeSource matching this modal port.
- property num_modes#
Number of modes defined on this port.