.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/basic/plot_mode_field_1.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_basic_plot_mode_field_1.py: Mode fields =========== .. GENERATED FROM PYTHON SOURCE LINES 8-10 Imports ~~~~~~~ .. GENERATED FROM PYTHON SOURCE LINES 10-13 .. code-block:: Python from PyFiberModes import FiberFactory, HE11, LP02 from PyFiberModes.field import Field .. GENERATED FROM PYTHON SOURCE LINES 14-17 Generating the fiber structures ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here we create the different fiber design that we want to explore .. GENERATED FROM PYTHON SOURCE LINES 17-38 .. code-block:: Python core_indexes = 1.54 factory = FiberFactory(wavelength=1550e-9) factory.add_layer(name="core", radius=4e-6, index=core_indexes) factory.add_layer(name="cladding", index=1.4444) mode = LP02 fiber = factory[0] field = Field( fiber=fiber, mode=mode, limit=10e-6, n_point=201 ) figure = field.plot(plot_type=['Ex', 'Ey']) # figure = field.plot(plot_type=['Ex', 'Ey', 'Ez', 'Er', 'Ephi']) # - .. image-sg:: /gallery/basic/images/sphx_glr_plot_mode_field_1_001.png :alt: plot mode field 1 :srcset: /gallery/basic/images/sphx_glr_plot_mode_field_1_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 8.268 seconds) .. _sphx_glr_download_gallery_basic_plot_mode_field_1.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_mode_field_1.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_mode_field_1.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_