MaterialsΒΆ
We have different materials available thanks to the materialspy library
[1]:
import numpy as np
import matplotlib.pyplot as plt
import opticalmaterialspy as mat
import modes as ms
m = mat.SiO2()
# Refractive index @ 1550nm.
print('n(1.55e-6m):', m.n(1.55e-6)) # Knows 1.55e-6 must be [m].
print('n(1.55um):', m.n(1.55)) # Knows 1.55 must be [um].
print('n(1550nm):', m.n(1550)) # Knows 1550 must be [nm].
# Group velocity refractive index @ 900nm.
print('n_gv(900nm):', m.ng(900))
# Group velocity dispersion @ 808nm.
print('GVD(0.808um):', m.gvd(0.808))
n(1.55e-6m): 1.444023621703261
n(1.55um): 1.444023621703261
n(1550nm): 1.444023621703261
n_gv(900nm): 1.4646714467190605
GVD(0.808um): 3.679067864348354e-26
[2]:
wavelengths = np.linspace(1.3, 1.6, 10)
n = [ms.materials.si(w) for w in wavelengths]
plt.plot(wavelengths, n)
plt.xlabel('wavelength (um)')
plt.ylabel('Refractive index')
plt.title('Silicon refractive index')
[2]:
Text(0.5, 1.0, 'Silicon refractive index')
if your material is not defined in the materials module you can always add it
[3]:
def nitride(wl):
return mat.RefractiveIndexWeb(
"https://refractiveindex.info/?shelf=main&book=Si3N4&page=Luke"
).n(wl)
[4]:
nsin = [nitride(w) for w in wavelengths]
[5]:
plt.plot(wavelengths, nsin)
plt.xlabel('wavelength (nm)')
plt.ylabel('Refractive index')
plt.title('Silicon nitride refractive index (Si3N4)')
[5]:
Text(0.5, 1.0, 'Silicon nitride refractive index (Si3N4)')
[6]:
help(ms.materials)
Help on module modes.materials in modes:
NAME
modes.materials - We have different materials available thanks to the [materialspy](https://opticalmaterialspy.readthedocs.io/en/latest/index.html) module
DESCRIPTION
.. plot::
:include-source:
import matplotlib.pyplot as plt
import modes as ms
wavelengths = np.linspace(1.3, 1.6, 10)
nsi = [ms.materials.si(w) for w in wavelengths]
plt.plot(wavelengths, nsi)
plt.xlabel('wavelength (nm)')
plt.ylabel('Refractive index')
plt.title('Silicon refractive index')
FUNCTIONS
air(wl)
nitride(wl: float) -> numpy.float64
si(wl: Union[float, numpy.float64]) -> numpy.float64
sio2(wl: Union[float, numpy.float64]) -> numpy.float64
DATA
Union = typing.Union
FILE
/home/docs/checkouts/readthedocs.org/user_builds/modes/checkouts/latest/modes/materials.py
[7]:
wavelengths = np.linspace(1.3, 1.6, 10)
n = [ms.materials.sio2(w) for w in wavelengths]
plt.plot(wavelengths, n)
plt.xlabel('wavelength (um)')
plt.ylabel('Refractive index')
plt.title('SiO2')
[7]:
Text(0.5, 1.0, 'SiO2')
[ ]: