fdtdx.PortSpec#

class fdtdx.PortSpec(center, axis, direction, width, height, mode_index=0, filter_pol='te', name='')[source]#

Bases: object

Specification for a simulation port (input source or output detector).

Coordinates are expressed in the core coordinate system where the origin corresponds to the start of the simulation domain (excluding PML padding).

Parameters:
  • center (tuple[float, float, float]) – 3-D centre position (x, y, z) in metres, relative to the start of the core region.

  • axis (int) – Propagation axis - 0 for x, 1 for y, 2 for z.

  • direction (Literal['+', '-']) – Propagation direction along axis - '+' or '-'.

  • width (float) – Cross-section extent (metres) along the first transverse axis.

  • height (float) – Cross-section extent (metres) along the second transverse axis.

  • mode_index (int) – Waveguide mode index (default 0 = fundamental mode).

  • filter_pol (Optional[Literal['te', 'tm']]) – Polarisation filter - 'te', 'tm', or None.

  • name (str) – Optional name for the source/detector object.

Quick Reference#

Attributes

Methods

Attributes#

PortSpec.filter_pol: Optional[Literal['te', 'tm']] = 'te'#
PortSpec.mode_index: int = 0#
PortSpec.name: str = ''#
PortSpec.center: tuple[float, float, float]#
PortSpec.axis: int#
PortSpec.direction: Literal['+', '-']#
PortSpec.width: float#
PortSpec.height: float#

Methods#

If you find any errors in the documentation, please report them in the Github Issues!