.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/SMF28/plot_smf28_group_index_vs_wavelength.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_SMF28_plot_smf28_group_index_vs_wavelength.py: Modal dispersion VS core index ============================== .. GENERATED FROM PYTHON SOURCE LINES 8-10 Imports ~~~~~~~ .. GENERATED FROM PYTHON SOURCE LINES 10-15 .. code-block:: Python import numpy from PyFiberModes import LP01 from PyFiberModes.fiber import load_fiber import matplotlib.pyplot as plt .. GENERATED FROM PYTHON SOURCE LINES 16-19 Generating the fiber structures ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here we create the different fiber design that we want to explore .. GENERATED FROM PYTHON SOURCE LINES 19-40 .. code-block:: Python wavelength_list = numpy.linspace(500e-9, 3000e-9, 100) data = [] for wavelegnth in wavelength_list: smf28 = load_fiber(fiber_name='SMF28', wavelength=wavelegnth) dispersion = smf28.get_effective_index(mode=LP01) data.append(dispersion) figure, ax = plt.subplots(1, 1) ax.set( title='Mode fields for vectorial mode if x-direction', xlabel=r'Wavelength [$\mu m$]', ylabel='Group index', ) ax.plot(wavelength_list, data) plt.show() # - .. image-sg:: /gallery/SMF28/images/sphx_glr_plot_smf28_group_index_vs_wavelength_001.png :alt: Mode fields for vectorial mode if x-direction :srcset: /gallery/SMF28/images/sphx_glr_plot_smf28_group_index_vs_wavelength_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.557 seconds) .. _sphx_glr_download_gallery_SMF28_plot_smf28_group_index_vs_wavelength.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_smf28_group_index_vs_wavelength.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_smf28_group_index_vs_wavelength.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_