You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: paper/paper.bib
+18-3Lines changed: 18 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -185,7 +185,7 @@ @article{Berreman72
185
185
}
186
186
187
187
@misc{byrnes2020multilayer,
188
-
title={Multilayer optical calculations},
188
+
title={Multilayer optical calculations},
189
189
author={Steven J. Byrnes},
190
190
year={2020},
191
191
eprint={1603.02720},
@@ -324,7 +324,7 @@ @article{Passler19
324
324
abstract = {In our paper J. Opt. Soc. Am. B34, 2128 (2017)JOBPDE0740-322410.1364/JOSAB.34.002128 in Section 2.C, the calculation of the layer-dependent electric field distribution is only valid for media with permittivity tensors that are diagonal in the lab frame, i.e., non-birefringent media. This erratum corrects Section 2.C such that the electric field distribution in birefringent media is calculated correctly. Further, Eqs. (20) and (33)--(36) are corrected. The associated MATLAB implementation has been updated.},
325
325
}
326
326
327
-
@article{Pearce2021,
327
+
@article{Pearce2021,
328
328
doi = {10.21105/joss.03460},
329
329
url = {https://doi.org/10.21105/joss.03460},
330
330
year = {2021},
@@ -369,4 +369,19 @@ @article{Bay2022
369
369
Program Title: PyLlama – Python Toolkit for the Electromagnetic Modelling of Multilayered Anisotropic Media CPC Library link to program files: https://doi.org/10.17632/dzw8x5vyrv.1 Developer's repository link: https://github.com/VignoliniLab/PyLlama Licensing provisions: GPLv3 Programming language: Python Supplementary material: User guide and tutorials at https://pyllama.readthedocs.io/ Nature of problem: Computation of the optical reflection and transmission coefficients of arbitrary multilayered linear media, composed of an arbitrary number of layers, possibly mixing isotropic and anisotropic, absorbing and non-absorbing materials, for linearly or circularly polarised light. Solution method: Implementation of both the transfer matrix method (faster) and the scattering matrix method (more robust) relying on a 4×4 matrix formalism. Additional comments including restrictions and unusual features: Integration of a physical model to handle cholesteric structures, blueprint for the integration of user-created custom systems, hassle-free export of spectra for non-programmers even for complex and/or custom systems. External routines include: Numpy [1], Scipy [2], as well as Sympy [3] (optional).
Copy file name to clipboardExpand all lines: paper/paper.md
+64-56Lines changed: 64 additions & 56 deletions
Original file line number
Diff line number
Diff line change
@@ -23,42 +23,53 @@ bibliography: paper.bib
23
23
24
24
# Summary
25
25
26
-
PyElli is an open-source analysis tool for the linear optical interaction of layered materials written in Python.
27
-
It primarily targets spectroscopic ellipsometry but is adaptable to various transmission and reflection experiments.
28
-
29
-
Spectroscopic ellipsometry (SE) is used throughout various scientific fields to determine the optical constants of layered material stacks.
30
-
SE experiments do not yield directly usable data; numerical analysis is required to deduce actual material parameters.
31
-
This is typically done with the transfer-matrix method (TMM), which associates an interaction matrix with the optical response of each material layer.
32
-
The full optical response of a material system is then determined by matrix multiplication of the layers' matrices.
33
-
34
-
Proprietary software for such analysis is usually bundled with ellipsometers, with each manufacturer supplying their own adapted version.
35
-
While this suits laboratory workflows, it ties scientists to specific optical models and experiments available in the provided software.
36
-
This makes results hard to reproduce with other systems and data interchange cumbersome.
37
-
If the software does not support a specific kind of analysis, such as calculating anisotropic materials or simultaneous fitting of external experimental parameters, scientists need to use third-party software.
38
-
39
-
PyElli offers an open-source alternative to existing solutions while remaining as compatible as possible.
40
-
This allows scientists to adapt PyElli to their needs, either for custom experiments not covered by other software [@eberheim2022] or as a full FAIR data [@Wilkinson2016] analysis pipeline for SE measurements.
41
-
It is designed with extensibility and adaptability in mind, enabling scientists to easily develop custom analysis pipelines.
26
+
PyElli is an open-source Python-based analysis tool for the linear optical interaction of layered materials.
27
+
The code primarily targets spectroscopic ellipsometry (SE) but is adaptable to various transmission and reflection experiments featuring spectral and polarization resolution.
28
+
29
+
Various scientific fields use SE to determine the optical constants of materials and layered material stacks.
30
+
The as-measured SE experimental requires numerical analysis to deduce commonly used, physically meaningful material parameters.
31
+
A typical approach uses transfer-matrix methods (TMM) [@tompkins2005, @WVASEguide].
32
+
Here, an interaction matrix describes the optical response of each individual material layer.
33
+
The full optical response of a multilayer system is then determined by matrix multiplication of the layers' matrices.
34
+
35
+
The ellipsometer hardware typically supports bundled proprietary software solutions for such analyses.
36
+
Unfortunately, each manufacturer supplies their own adapted tools.
37
+
This promises efficient laboratory workflows if working flawlessly.
38
+
However, it binds scientists to specific optical models and experiments available in the provided software.
39
+
Furthermore, data interchange is cumbersome, and results may be hard to reproduce on competitive systems due to the use of other models or parameters.
40
+
Finally, limitations of the bundled software may stimulate scientists to use third-party software.
41
+
For example, bundled software packages may not support specific kinds of analyses, such as including the response of optically anisotropic materials or simultaneous fitting of external experimental parameters.
42
+
43
+
PyElli offers an open-source alternative extending the capabilities of existing solutions, while aiming to remain as compatible as possible:
44
+
By providing importers for various manufacturers (Woollam VWASE, Woollam CompleteEASE, Sentech, Accurion), and having dispersion models
45
+
46
+
Typical examples are implementations of custom experimental geometries not covered by other software [@eberheim2022] or as a full FAIR data [@Wilkinson2016] automated analysis pipeline for SE measurements.
47
+
The code is designed with extensibility and adaptability in mind, enabling scientists to easily develop custom analysis pipelines.
42
48
PyElli also supports recent advances in the standardization of ellipsometry data and models, addressing the need for FAIR data.
43
49
44
-
The optical models used in PyElli adhere closely to the literature [@Hilfiker2018].
45
-
New dispersions can be added as code, or a generic formula dispersion can be used, which parses a text-based formula into a fittable dispersion.
46
-
47
-
For analyzing materials, it is helpful to have a database of predefined models.
48
-
PyElli includes the popular public domain database for optical constants [refractiveindex.info](https://refractiveindex.info)[@rii], allowing users to load literature dispersions with a single line of code.
50
+
PyElli aims to provide straight-forward availability of a database of predefined dispersion models for analyzing materials.
51
+
All optical models adhere closely to the literature [@Hilfiker2018].
52
+
Also, the software easily includes the popular public-domain database for optical constants [refractiveindex.info](https://refractiveindex.info)[@rii].
53
+
This allows the inclusion of literature dispersions with a single line of code.
54
+
Additional dispersion relations can be either hard coded, which is more efficient, or parsed from a text-based domain-specific language into a fittable dispersion.
49
55
50
56
PyElli supports multiple solving algorithms with different characteristics.
51
-
Currently, two algorithms using different formulations are available: a simple but fast algorithm based on a 2x2 matrix formulation [@byrnes2020multilayer] and a more complex 4x4 formulation [@Berreman72; @castany].
52
-
While the 2x2 algorithm splits the light into two perpendicular polarized beams and solves them separately, the 4x4 matrix approach solves the complete electromagnetic field, allowing for the solution of more complex problems, such as anisotropic materials or active media.
53
-
54
-
For fast processing, PyElli's algorithms are fully vectorized for multiple wavelengths and leverage numerical algebra libraries like [NumPy](https://numpy.org)[@harris2020array] and [SciPy](https://scipy.org)[@2020SciPy-NMeth].
55
-
This allows the use of advanced fitting algorithms, such as global optimizers, within reasonable evaluation times and enables embedded in-situ monitoring of overlayer growth.
56
-
The use of Python and vectorization libraries also facilitates the adoption of artificial intelligence-based analysis of SE data.
57
+
Currently, two algorithms using different formulations are available: a fast algorithm based on a 2x2 matrix formulation [@byrnes2020multilayer] and a more complex 4x4 formulation [@Berreman72; @castany].
58
+
The 2x2 algorithm divides the light into two perpendicular linearly polarized beams, which are solved separately.
59
+
This, for example, eliminates the possibility of including birefringent materials.
60
+
The 4x4 matrix approach solves Maxwell's equations.
61
+
These equations describe the complete electromagnetic field inside each layer of the sample and couple this together using a matrix formalism.
62
+
This allows finding solutions to more complex problems, such as anisotropic materials, active media, or magneto-optic samples.
63
+
64
+
PyElli's ensures fast processing through fully vectorized algorithms for multiple wavelengths and by leveraging numerical algebra libraries like [NumPy](https://numpy.org)[@harris2020array] and [SciPy](https://scipy.org)[@2020SciPy-NMeth].
65
+
Together, these runtime advantages enable the practical use of advanced fitting algorithms such as global optimizers while maintaining reasonable evaluation times.
66
+
Intriguingly, such advantages enable embedded in-situ monitoring and real-time data analysis of overlayer growth.
67
+
Thus, the use of Python and vectorization libraries also facilitates the adoption of artificial intelligence-based analysis of SE data.
57
68
58
69
# Statement of need
59
70
60
71
The importance of publishing data according to the FAIR principles [@Wilkinson2016] is growing.
61
-
Many research journals already require authors to add supporting data, and sponsors are starting to demand data governance from institutes and researchers.
72
+
Many research journals already require authors to add supporting data, and there is a growing expectation from sponsors for institutes and researchers to implement data governance.
62
73
Since reproducing data requires not only the data itself but also the software used to create it, the FAIR principles have recently been extended to apply to research software as well[@Barker2022].
63
74
We believe that producing FAIR data and using a FAIR and open analysis pipeline is especially important for SE, as the results are tightly related and dependent on the algorithms and models used for evaluation.
64
75
@@ -76,23 +87,23 @@ In summary, we believe and hope that PyElli will contribute to easier analysis,
76
87
77
88
Other notable Python open-source software for solving transfer-matrices is available, but tends to focus on different aspects:
78
89
79
-
-[PyGTM](https://pygtm.readthedocs.io)[@Passler17; @Passler19] provides a slower but more extensive general transfer matrix approach. It allows calculation of additional parameters, like the local strength of the electric field at any position in the multilayer stack.
90
+
-[PyGTM](https://pygtm.readthedocs.io)[@Passler17; @Passler19] provides an non-vectorized, extensive general transfer matrix approach. It allows calculation of additional parameters, like the local strength of the electric field at any position in the multilayer stack.
80
91
-[PyLlama](https://pyllama.readthedocs.io)[@Bay2022] focuses on the simulation of liquid crystals and uses non-vectorized TMM and a scattering matrix algorithm (rigorous coupled-wave analysis, RCWA).
81
92
-[RayFlare](https://rayflare.readthedocs.io)[@Pearce2021] is a complete toolkit to simulate the physical and electrical properties of solar cells. It provides the same 2x2 algorithm[@byrnes2020multilayer] and a scattering matrix approach (S4).
82
-
-[tmm_fast](https://github.com/MLResearchAtOSRAM/tmm_fast)[@Luce22] is a fast variant of Byrnes' algorithm for artificial intelligence-based analysis of multilayer stacks.
93
+
-[tmm_fast](https://github.com/MLResearchAtOSRAM/tmm_fast)[@Luce22] is a vectorized variant of Byrnes' algorithm for artificial intelligence-based analysis of multilayer stacks.
# Example: Building a model for an oxide layer on silicon
90
101
91
-
Building an optical model in PyElli is simple and straightforward.
92
-
Here, we will demonstrate by creating a standard model for SiO2 on Si.
93
-
We will use a Cauchy dispersion function for SiO2 and tabulated literature values for Si loaded from the refractiveindex.info database.
102
+
Building an optical model in PyElli is straightforward.
103
+
Here, we will demonstrate by creating a standard model for SiO$_2$ on Si.
104
+
We will use a Cauchy dispersion function for SiO$_2$ and tabulated literature values for Si loaded from the refractiveindex.info database.
94
105
95
-
Before building the model, we need to import the necessary libraries.
106
+
We need to import the necessary libraries before building the model:
96
107
PyElli is imported from the module `elli`, and we want to use our parameters wrapper `ParamsHist`, which is imported from `elli.fitting`. `ParamsHist` is a wrapper around the `Parameters` class from [lmfit](https://lmfit.github.io/lmfit-py/index.html)[@matt_newville_2023_7810964], adding history to it so you can revert your model to an earlier set of parameters.
97
108
We also import `linspace` from `numpy` for generating a wavelength axis.
98
109
@@ -102,32 +113,27 @@ import elli
102
113
from elli.fitting import ParamsHist, fit
103
114
```
104
115
105
-
First, we instantiate the parameters.
106
-
We only need `n0` and `n1` for SiO2, so we keep all other values at their default, which is zero in this case.
107
-
Additionally, we introduce the thickness of SiO2 in nanometers.
108
-
Here, you may also add additional settings for lmfit parameters.
116
+
Initially, we define the fit parameters.
117
+
The Cauchy model for SiO$_2$ is defined by the `SiO2_n0` and `SiO2_n1` parameters, along with its layer thickness measured in nanometers.
118
+
Here, additional settings for lmfit parameters like constraints or bounds might be added.
109
119
For a list of parameter arguments, refer to lmfit's documentation or consult our verbose [basic example](https://pyelli.readthedocs.io/en/stable/auto_examples/plot_01_basic_usage.html#sphx-glr-auto-examples-plot-01-basic-usage-py).
110
120
111
121
```python
112
122
params = ParamsHist()
113
-
params.add("n0", value=1.452)
114
-
params.add("n1", value=36.0)
115
-
params.add("thickness", value=20)
123
+
params.add("SiO2_n0", value=1.452)
124
+
params.add("SiO2_n1", value=36.0)
125
+
params.add("SiO2_thickness", value=20)
116
126
```
117
127
118
-
Now, the Cauchy model is created using the `Cauchy` class.
128
+
Now, the Cauchy model is created using the `Cauchy` class and the defined parameters.
129
+
All other Cauchy coefficients are kept at their default value of zero in this particular case.
119
130
Each dispersion has its own class, and you'll find a list of different dispersions in our [documentation](https://pyelli.readthedocs.io/en/stable/dispersions.html).
120
-
It is important to note that there are two types of parameters for dispersions: **Single parameters**, which only appear once in the formula (e.g., `n0` and `n1`), and **repeated parameters** which represent one element of a sum and may be used in an arbitrary amount.
121
-
Single parameters are added to the class constructor, like `Cauchy(param1, ...)`, and repeated parameters are added via the `.add(...)` method, like `Sellmeier().add(A=param_a, B=param_b)`.
122
-
The available single and repeated parameters are listed in the documentation for each dispersion.
123
-
We are using a Cauchy model here, which only takes single parameters.
124
-
Therefore, we pass all parameters to the class constructor.
125
-
Subsequently, the `.get_mat()` function is called on the created object to automatically convert the dispersion into an isotropic material.
131
+
Subsequently, the `.get_mat()` method is called on the created object to automatically convert the dispersion into an isotropic material.
126
132
127
133
```python
128
134
SiO2 = elli.Cauchy(
129
-
params["n0"],
130
-
params["n1"],
135
+
params["SiO2_n0"],
136
+
params["SiO2_n1"],
131
137
).get_mat()
132
138
```
133
139
@@ -144,22 +150,22 @@ With all materials instantiated, we can build the layered structure.
144
150
The `Structure` class takes three arguments:
145
151
146
152
- The incident half-space, which is typically air.
147
-
- The layer stack as an array of `Layer` objects. The `Layer` object is created by adding the material and the layer thickness.
153
+
- The layer stack as a list of `Layer` objects. The `Layer` object is created by adding the material and the layer thickness.
148
154
- The lower half-space, which represents the substrate.
149
155
150
156
The incident and lower half-space are modeled as infinite to terminate the calculation.
151
-
Therfore backside scattering of the substrate cannot be introduced into the calculation.
157
+
Therefore, backside scattering of the substrate cannot be introduced into the calculation.
152
158
153
159
```python
154
160
structure = elli.Structure(
155
161
elli.AIR,
156
-
[elli.Layer(SiO2, params["thickness"])],
162
+
[elli.Layer(SiO2, params["SiO2_thickness"])],
157
163
Si,
158
164
)
159
165
```
160
166
161
-
Finally, we trigger a calculation by calling `evaluate(...)`on the structure.
162
-
We use a `wavelengths` array from $210\;nm$ to $800\;nm$ for the calculation range and an angle of incidence of $70$ degree (second parameter of evaluate).
167
+
Finally, we trigger a calculation by calling the `evaluate(...)`method of the `structure` object.
168
+
We use a `wavelengths` array from $210$ nm to $800$ nm for the calculation range and an angle of incidence of $70°$ degree (second parameter of evaluate).
163
169
164
170
```python
165
171
wavelengths = np.linspace(210, 800, 100)
@@ -170,7 +176,9 @@ The calculation is stored in the `result` variable, which is a [`Result` object]
170
176
This object can hold all input parameters and the calculation results. You can call methods like `psi`, `delta`, `R`, etc., to get your desired output.
171
177
We can also use the `@fit` decorator in `elli.fitting` to automatically show a widget-based fitting GUI for Jupyter notebooks.
172
178
Figure \autoref{fig:fit_dec_example} shows the output when used with this example model and some experimental data.
179
+
173
180

181
+
174
182
You find additional information on how this is done in our [examples](https://pyelli.readthedocs.io/en/stable/auto_examples/index.html).
0 commit comments