-
Notifications
You must be signed in to change notification settings - Fork 11
Joss paper #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
domna
wants to merge
44
commits into
master
Choose a base branch
from
joss-paper
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Joss paper #88
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
a8aed68
Adds paper blueprint
domna 14489b8
Adds first rough summary paragraph and content ideas
domna c8ce087
Disable actions for paper branch
domna c583c79
Refined summary
domna 0cc29bd
small changes and more notes
MarJMue 532a00f
Restructure and more text
MarJMue cb7f474
Disable requirements action
MarJMue bded00f
formatting
MarJMue bdd9a4c
Disable workflows w/o branch ignore
domna cefcf8f
Text refinements and adding basic example
domna 6aa7d81
modified: paper/paper.md
domna af750c4
Adds paper generation workflow
domna 86787b3
Adds example text
domna 05e5f2f
Renaming and refinements
domna e6c081a
Refinements, check links and refs
domna eaae1df
Remove quotes for refs
domna ce96499
Remove self-written references at the end
domna 3ae2631
Adds more references
domna 94b0656
Adds tetraph paper ref
domna ed7b4d3
Added references and links
domna 174ddc7
Fixes refs
domna 0d12617
Fixes ref2
domna d1a9b1d
Check without affiliation
domna 2f23da7
minor fixes
MarJMue 132e25d
Minor changes and acknowledgments
MarJMue b3f01d5
Improve language and fix spelling mistakes
MarJMue 0faca82
Update draft-pdf.yml
MarJMue c269c3b
Minor fixes
MarJMue b7bc9e1
Incorporate Sangam's suggestions
MarJMue 6c5267f
Additional fixes
MarJMue 8cf01a8
Started updating references
MarJMue 7c46126
Umlauf 2 Sangam
MarJMue 02641a3
Update Figure 1 and fixes
MarJMue df0d402
Update bib file
MarJMue 0c6fa54
Small improvements and bib fixes
MarJMue 1c8f1b1
Merge branch 'master' into joss-paper
domna 5801b51
Add latest changes from Sangam
domna 1bc857f
Update nomad citation and links
domna 44a3a40
Shorten nomad part
domna 03bbd95
remove florians affiliation
MarJMue 0b2c0d9
match pyElli spelling
MarJMue 2dc7d0f
Merge branch 'master' into joss-paper
MarJMue 4ff45f1
Fix affiliation and dois
MarJMue 922b253
Remove doi for Byrnes
MarJMue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
on: [push] | ||
|
||
jobs: | ||
paper: | ||
runs-on: ubuntu-latest | ||
name: Paper Draft | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Build draft PDF | ||
uses: openjournals/openjournals-draft-action@master | ||
with: | ||
journal: joss | ||
paper-path: paper/paper.md | ||
- name: Upload | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: paper | ||
path: paper/paper.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,6 @@ name: Linting | |
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
linting: | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ name: Pytest | |
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
test_python: | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
--- | ||
title: "pyElli: An open source ellipsometry analysis tool for FAIR data" | ||
tags: | ||
- Python | ||
- spectroscopy | ||
- ellipsometry | ||
- solid state physics | ||
- transfer matrix method | ||
authors: | ||
- name: Marius J. Müller | ||
orcid: 0009-0005-2187-0122 | ||
affiliation: 1 | ||
- name: Sangam Chatterjee | ||
orcid: 0000-0002-0237-5880 | ||
affiliation: 1 | ||
- name: Florian Dobener | ||
orcid: 0000-0003-1987-6224 | ||
affiliation: 1 | ||
affiliations: | ||
- name: Institute of Experimental Physics I and Center for Materials Research (ZfM/LaMa), Justus Liebig University Giessen, Heinrich-Buff-Ring 16, Giessen, D-35392 Germany | ||
index: 1 | ||
date: 24 April 2023 | ||
bibliography: paper.bib | ||
--- | ||
|
||
# Summary | ||
|
||
**pyElli** is an open-source Python-based analysis tool for evaluating the linear optical interaction of layered materials. | ||
The code primarily targets spectroscopic ellipsometry (SE). | ||
In addition, it is adaptable to various transmission and reflection experiments featuring spectral and polarization resolution. | ||
|
||
Various scientific fields use SE to determine the optical functions of materials and multiple-layer stacks often referred to simply as "optical constants" or "material parameters". | ||
The respective experimental "as-measured" SE data requires numerical analysis to deduce physically meaningful quantities. | ||
Typical approaches apply transfer-matrix methods (TMM) [@tompkins2005; @WVASEguide]. | ||
Here, an interaction matrix describes the optical response of each individual material layer. | ||
Determining the optical response of a multilayer system then requires matrix multiplication of the individual layers' matrices. | ||
|
||
Ellipsometer hardware typically supports bundled proprietary software solutions enabling such analyses. | ||
Unfortunately, each manufacturer supplies their own adapted software solution. | ||
This approach promises efficient laboratory workflows - if working flawlessly. | ||
However, it binds scientists to specific optical models available and limits experiments to the ones supported in the provided software. | ||
Furthermore, data interchange can be cumbersome. | ||
For example, results may even be hard to reproduce on competitive systems due to the use of other models or parameters. | ||
In addition, limitations of the specific software included with each instrument may stimulate scientists to use third-party software: | ||
bundled software packages may not support specific desirable kinds of analyses, such as including the response of optically anisotropic materials or simultaneous fitting of external experimental parameters. | ||
|
||
**pyElli** offers an open-source alternative extending the capabilities of existing solutions, while aiming to remain as compatible as possible, by providing data imports from various manufacturers (Woollam VWASE, Woollam CompleteEASE, Sentech, Accurion). | ||
The code is designed with extensibility and adaptability in mind enabling the implementation of individually adapted models as well as data evaluation with custom tools. | ||
Typical examples for advanced use-cases are implementations of custom experimental geometries not covered by other software [@eberheim2022], imaging ellipsometry, or as a full FAIR data automated analysis pipeline for SE measurements. | ||
**pyElli** also supports recent advances in the standardization of ellipsometry data and models, addressing the need for FAIR data [@Wilkinson2016]. | ||
|
||
**pyElli** aims to provide a straight-forward database of predefined dispersion models for analyzing materials. | ||
All optical models adhere closely to the literature [@Hilfiker2018]. | ||
The software easily includes the popular public-domain database for optical constants [refractiveindex.info](https://refractiveindex.info) [@rii]. | ||
This allows the inclusion of literature dispersions with a single line of code. | ||
Additional dispersion relations can be either hard coded, which is more efficient, or parsed from a text-based domain-specific language into a dispersion which can be fitted, e.g., polynomially. | ||
|
||
**pyElli** supports multiple solving algorithms with different characteristics. | ||
Currently, two algorithms using different formulations are available: a fast algorithm based on a 2x2 matrix formulation [@byrnes2020multilayer] and a more complex 4x4 matrix formulation [@Berreman72; @berreman4x4_doku; @berreman4x4_software]. | ||
The 2x2 matrix algorithm divides the light into two perpendicular linearly polarized beams, which are solved separately. | ||
One of its limitations is eliminating the possibility to include birefringent materials. | ||
The 4x4 matrix approach fully solves Maxwell's equations. | ||
These equations describe the complete electromagnetic field inside each layer of the sample and couple these together using the matrix formalism. | ||
This allows finding solutions to more complex problems such as anisotropic materials, active media or magneto-optic samples. | ||
|
||
**pyElli** 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]. | ||
Together, these runtime advantages enable the practical use of advanced fitting algorithms such as global optimizers while maintaining reasonable evaluation times. | ||
As a result, **pyElli** enables integrated in-situ monitoring and real-time data analysis of overlayer growth. | ||
Furthermore, the use of Python and vectorization libraries also facilitates the development of artificial intelligence-based SE data analysis. | ||
|
||
# Statement of need | ||
|
||
The importance of publishing data according to the FAIR principles is growing [@Wilkinson2016]. | ||
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. | ||
The FAIR principles have recently been extended to apply to research software as well since reproducing data requires not only the data itself but also the software used to create it [@Barker2022]. | ||
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. | ||
|
||
An open-source toolkit, **pyElli** has many inherent benefits over proprietary software. | ||
For SE, optical models vary between manufacturers and translation can be difficult without comprehensive documentation. | ||
**pyElli's** open-source nature makes optical models extendable, auditable, and fully comprehensive. | ||
Each version of **pyElli** is associated with a DOI and a Zenodo upload, allowing for reliable referencing and reproducibility of analysis results. | ||
It supports reading and writing standardized files in the [nexus format](https://nexusformat.org) and is also integrated as an example in the research data management software NOMAD [@Scheidgen2023]. | ||
|
||
In summary, **pyElli** aims to provide the means of more straight-forward data analysis, reproducibility, and FAIR data management within the ellipsometry community. | ||
|
||
# Software with similar functionalities | ||
|
||
Other notable Python open-source software for solving transfer-matrices is available, but tends to focus on different aspects: | ||
|
||
- [PyGTM](https://pygtm.readthedocs.io) [@Passler17; @Passler19] provides a 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. | ||
- [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). | ||
- [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). | ||
- [tmm_fast](https://github.com/MLResearchAtOSRAM/tmm_fast) [@Luce22] is a vectorized variant of Byrnes' algorithm for artificial intelligence-based analysis of multilayer stacks. | ||
- [tmmax](https://github.com/bahremsd/tmmax) [@tmmax] is a JIT-compilable version of the 2x2 matrix method, leveraging the _JAX_ toolkit. | ||
- [PyMoosh](https://github.com/AnMoreau/PyMoosh) [@Langevin:24] is a comprehensive toolkit for computing the optical properties of multilayered structures, with a plethora of available scattering and transfer matrix algorithms. | ||
|
||
# Example: Building a model for an oxide layer on silicon | ||
|
||
This example aims to illustrate the straight-forward implementation and building of an optical model in **pyElli**. | ||
The chosen model system is a thin SiO$_2$ layer on bulk Si. | ||
A Cauchy dispersion function describes the SiO$_2$. | ||
Tabulated literature values for Si are loaded from the refractiveindex.info database. | ||
|
||
The necessary libraries are loaded before building the model: | ||
**pyElli** is imported from the module `elli`. | ||
The `ParamsHist` wrapper around the `Parameters` class from [lmfit](https://lmfit.github.io/lmfit-py/index.html) [@matt_newville_2024_12785036] is imported from `elli.fitting`. | ||
It adds history functionality to revert any undesired model changes and to return to an earlier set of parameters. | ||
Importing `linspace` from `numpy` enables the generation of a wavelength axis. | ||
|
||
```python | ||
from numpy import linspace | ||
import elli | ||
from elli.fitting import ParamsHist, fit | ||
``` | ||
|
||
Initially, we define the fit parameters. | ||
The Cauchy model for SiO$_2$ is defined by the `SiO2_n0` and `SiO2_n1` parameters along with its layer thickness measured in nanometers. | ||
Optionally, additional settings for _lmfit_ parameters like constraints or bounds might be added; refer to _lmfit's_ documentation for a list of parameter arguments 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). | ||
|
||
```python | ||
params = ParamsHist() | ||
params.add("SiO2_n0", value=1.452) | ||
params.add("SiO2_n1", value=36.0) | ||
params.add("SiO2_thickness", value=20) | ||
``` | ||
|
||
Next, the Cauchy model is created using the `Cauchy` class and the defined parameters. | ||
All undefined Cauchy coefficients are kept at their default value of zero in this particular case. | ||
Subsequently, the `.get_mat()` method is called on the created object to automatically convert the dispersion into an isotropic material. | ||
A list of different dispersion classes and their usage is given in the [documentation](https://pyElli.readthedocs.io/en/stable/dispersions.html). | ||
|
||
```python | ||
SiO2 = elli.Cauchy( | ||
params["SiO2_n0"], | ||
params["SiO2_n1"], | ||
).get_mat() | ||
``` | ||
|
||
Next, tabulated literature values for silicon is read from a database. | ||
Therefor, the code instantiates the refractiveindex.info database and queries it for the material (`Si`) and author (`Aspnes`). | ||
It is also possible to search the database to get a list of matching entries. | ||
See the [documentation](https://pyElli.readthedocs.io/en/stable/database.html) for details. | ||
|
||
```python | ||
rii_db = elli.db.RII() | ||
Si = rii_db.get_mat("Si", "Aspnes") | ||
``` | ||
|
||
All materials are now instantiated and enable the build of the layered structure. | ||
The `Structure` class takes three arguments: | ||
|
||
- The incident half-space, which is typically air. | ||
- The layer stack as a list of `Layer` objects. The `Layer` object is created by adding the material and the layer thickness. | ||
- The lower half-space, which represents the substrate. | ||
|
||
The incident and lower half-space are modeled as infinite to terminate the calculation. | ||
Consequently, the calculation inherently cannot capture backside scattering from the bottom substrate surface. | ||
|
||
```python | ||
structure = elli.Structure( | ||
elli.AIR, | ||
[elli.Layer(SiO2, params["SiO2_thickness"])], | ||
Si, | ||
) | ||
``` | ||
|
||
Finally, calling the `evaluate(...)` method of the `structure` object triggers the calculation. | ||
The example uses a `wavelengths` array from $210$ nm to $800$ nm for the calculation range and an angle of incidence of $70°$ degree. | ||
|
||
```python | ||
wavelengths = linspace(210, 800, 100) | ||
angle = 70 | ||
result = structure.evaluate(wavelengths, angle) | ||
``` | ||
|
||
The calculation is stored in the `result` variable, which is a [`Result` object](https://pyElli.readthedocs.io/en/stable/result.html). | ||
This object can hold all input parameters and the calculation results. | ||
Methods like `psi`, `delta`, `R`, etc., will deliver the desired output. | ||
Alternatively, the `@fit` decorator in `elli.fitting` automatically calls a widget-based fitting GUI for Jupyter notebooks. | ||
\autoref{fig:fit_dec_example} shows the output when used with this example model and some experimental data. | ||
|
||
 | ||
|
||
The [examples](https://pyElli.readthedocs.io/en/stable/auto_examples/index.html) provide additional information. | ||
|
||
# Acknowledgements | ||
|
||
Financial support is provided by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation), under grant No. 398143140 (FOR 2824). | ||
SC also acknowledges the LOEWE Transferprofessur "HIMAT". | ||
|
||
We thank Olivier Castany and Céline Molinaro for their implementation of the Berreman formalism, Steven J. Byrnes for his 2x2 transfer-matrix-method, and Mikhail Polyanskiy for curating the refractiveindex.info database. | ||
|
||
# References | ||
|
||
<!-- Citations to entries in paper.bib should be in | ||
[rMarkdown](http://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html) | ||
format. | ||
|
||
If you want to cite a software repository URL (e.g. something on GitHub without a preferred | ||
citation) then you can do it with the example BibTeX entry below for @fidgit. | ||
|
||
For a quick reference, the following citation commands can be used: | ||
|
||
- `@author:2001` -> "Author et al. (2001)" | ||
- `[@author:2001]` -> "(Author et al., 2001)" | ||
- `[@author1:2001; @author2:2001]` -> "(Author1 et al., 2001; Author2 et al., 2002)" --> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't say it solves them fully. It solves them fully in the frame of a 1D model. For modelling 2D or 3D interaction one would need to use RCWA or other algorithms to solve this.