- Simulation.set_mode(source, mode_ind, Nmodes=None, target_neff=None, pml_layers=(0, 0), bend_radius=None, bend_axis=None)¶
Set the index of the mode to be used by the mode source. To choose which mode to set use
viz_modes(). If provided as input,
Nmodesnumber of modes with effective index closest to
target_neffare computed, and the mode with index
mode_indis used. Otherwise, the modes are simply computed in order of decreasing effective index.
source (ModeSource) – A mode source in the simulation.
mode_ind (int) – Index of the mode to use.
Nmodes (None or int, optional) – Number of modes to compute, usually only necessary if
target_neffis also provided.
target_neff (None or float, optional) – Look for modes with effective index closest to
pml_layers (tuple, optional) – Number of PML layers to be added in each direction. These are added to the interior of the mode plane, i.e. the mode plane size is not extended. The default boundaries are PEC.
bend_radius (float or None, optional) – A curvature radius for simulation of waveguide bends.
None, optional) – The axis normal to the plane in which the bend lies. This must be provided if
None, and it must be orthogonal to the axis normal to the mode plane.