Group indexΒΆ

[1]:
import numpy as np
import matplotlib.pyplot as plt
import modes
import opticalmaterialspy as mat
[2]:
ms = modes.group_index?
[3]:
ms = modes.group_index
[4]:
wavelength = np.arange(1500, 1600, 10)*1e-3
widths = np.arange(400, 601, 50)*1e-3

plt.figure(1)

for i, width in enumerate(widths):
    ng = [modes.group_index(w, width=width) for w in wavelength]

    plt.plot(wavelength, ng, label=f'{width*1e3}')

plt.legend()
plt.xlabel('Wavelength (um)')
plt.xlabel('ng')
[4]:
Text(0.5, 0, 'ng')
../_images/notebooks_21_sweep_wavelength_4_1.png
[5]:
w = wavelength[0]
modes.group_index(w, width=width)
[5]:
[4.003720129512635]
[6]:
widths = np.array([490, 500, 510])*1e-3
ng = [modes.group_index(w, width=width)[0] for width in widths]
[7]:
np.diff(ng)/np.diff(widths) # dng/dw [/um]
[7]:
array([-2.96626677, -2.78207519])
[8]:
thicknesss = np.array([200, 220, 240])*1e-3
ng = [modes.group_index(w, thickness=thickness)[0] for thickness in thicknesss]
[9]:
np.diff(ng)/np.diff(thicknesss) # dng/dh [/um]
[9]:
array([0.10379131, 0.58652733])
[10]:
plt.plot(thicknesss*1e3, ng, '-o')
plt.ylabel('ng')
plt.xlabel('thickness (nm)')
[10]:
Text(0.5, 0, 'thickness (nm)')
../_images/notebooks_21_sweep_wavelength_10_1.png
[ ]: