```python
import sympy as sp
import numpy as np
import matplotlib.pyplot as plt

from ratter import *
```


```python
wavelength = 600 # length units: nm

Si = Material('Si', refractive_index_value=3.9400+0.019934j)  # Green 2008
air = Material('air', refractive_index_value=1.00027698) # Ciddor 1996
SiO2 = Material('SiO2', refractive_index_value=1.4580) # Malitson 1965: Fused silica
AlOx = Material('Al2O3', refractive_index_value=1.7675) # Malitson and Dodge 1972: α-Al2O3 (Sapphire)
```


```python
environment = Layer('env', air)
coating1 = Layer('coat1', SiO2)
coating2 = Layer('coat2', AlOx)
bulk = Layer('bulk', Si)
```


```python
stack = Layerstack([environment, coating1, coating2, bulk])
```


```python
r = stack.reflectance_amplitude()
```


```python
R = sp.conjugate(r)*r
```


```python
R_ = R.subs(LAMBDA_VAC, wavelength)
R_of_coating_thickness = as_function_of(R_, [coating1.thickness_symbol, coating2.thickness_symbol])
```


```python
d1 = np.arange(0,500)

for d2 in [50,200,500]:
    plt.plot(d1, np.real(R_of_coating_thickness(d1, d2)), label='{}'.format(d2))
plt.legend(title='$Al_2O_3$ thickness (nm)')
plt.ylabel('reflectivity')
plt.xlabel('$SiO_2$ thickness (nm)')
```

acda46eed40237f2f2b8d59e29510db047a9a069
ipynb
Jupyter Notebook
notebooks/thin-film coating.ipynb
fa-me/ratter
dce438b047d818aca92d47aa72a0268d48aab2d9
BSD-3-Clause
notebooks/thin-film coating.ipynb
fa-me/ratter
dce438b047d818aca92d47aa72a0268d48aab2d9
BSD-3-Clause
notebooks/thin-film coating.ipynb
fa-me/ratter
dce438b047d818aca92d47aa72a0268d48aab2d9
BSD-3-Clause
Qwen/Qwen-72B
1. YES
2. YES