.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/sellmeier/plot_bk7.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_sellmeier_plot_bk7.py: Plot the Refractive Index of Optical Material: BK7 ===================================================== This module demonstrates the usage of the PyOptik library to calculate and plot the refractive index of the optical material BK7 glass over a specified range of wavelengths. .. GENERATED FROM PYTHON SOURCE LINES 10-21 .. image-sg:: /gallery/sellmeier/images/sphx_glr_plot_bk7_001.png :alt: Refractive Index vs. Wavelength: [BK7] :srcset: /gallery/sellmeier/images/sphx_glr_plot_bk7_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/site-packages/PyOptik/material/base_class.py:60: UserWarning: Wavelength range goes from 5.0 µm to 5.0 µm which is outside the allowable range of 309.99999999999994 nm to 2.5 µm µm. [Material: BK7] warnings.warn( | .. code-block:: Python from PyOptik import MaterialBank from PyOptik.units import nanometer # Initialize the material with the Sellmeier model material = MaterialBank.BK7 # Calculate refractive index at specific wavelengths RI = material.compute_refractive_index(wavelength=[5_000] * nanometer) # Display calculated refractive indices at sample wavelengths material.plot() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.227 seconds) .. _sphx_glr_download_gallery_sellmeier_plot_bk7.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_bk7.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_bk7.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_