Note
Go to the end to download the full example code.
Mode fields#
from PyFiberModes.units import ureg
Imports#
Generating the fiber structures#
Here we create the different fiber design that we want to explore
fiber = load_fiber('SMF28', wavelength=1310e-9 * ureg.meter)
Preparing the figure
figure, ax = plt.subplots(1, 1)
ax.set(
title='Mode fields for vectorial mode if x-direction',
xlabel='Radius',
ylabel='Amplitude'
)
for mode in [HE11, LP01, LP11]:
field = Field(
fiber=fiber,
mode=mode,
limit=10e-6 * ureg.meter,
n_point=101
)
Ex = field.Ex().to("volt / meter").magnitude
max_abs = abs(max(Ex.max(), Ex.min()))
ax.pcolormesh(Ex, vmin=-max_abs, vmax=max_abs)
plt.show()
# -

Total running time of the script: (0 minutes 0.372 seconds)