port_modes

photonforge.port_modes(port, frequencies=(), mesh_refinement=None, group_index=False, impedance=False, technology=None, task_name=None, remote_path='Mode Solver', verbose=True)

Compute the port modes using Tidy3D’s mode solver.

Parameters:
  • port (str | Port | FiberPort | PortSpec | ModeSolver) – Port or port specification to solver for modes. A Tidy3D ModeSolver instance can also be used.

  • frequencies (Sequence[float]) – Sequence of frequency values for the mode solver. Not required if a ModeSolver instance is used as ‘port’.

  • mesh_refinement (float) – Minimal number of mesh elements per wavelength used for mode solving.

  • group_index (bool) – Flag indicating whether the mode solver should include group index computation.

  • impedance (bool) – Flag indicating whether the mode impedances should also be computed and returned.

  • technology (Technology) – Technology specification for the port.

  • task_name (str) – Name for the Tidy3D task.

  • remote_path (str) – Remote folder for the task.

  • verbose (bool) – Flag controlling solver verbosity.

Returns:

Mode solver object with calculated data. If impedance == True, the calculated impedance is also returned (None for optical modes).

Return type:

ModeSolver

Note

If a ModeSolver instance is used as ‘port’, arguments ‘frequency’, ‘mesh_refinement’, ‘group_index’, and ‘technology’ have no effect.