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.

Refractive Index vs. Wavelength: [BK7]
/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(

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()

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

Gallery generated by Sphinx-Gallery