JaxLayerLumos: A JAX-based Differentiable Optical and Radio Frequency Simulator for Multilayer Structures
JaxLayerLumos: A JAX-based Differentiable Optical and Radio Frequency Simulator for Multilayer Structures - Published in JOSS (2025)
Science Score: 95.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
4 of 5 committers (80.0%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Repository
A JAX-based efficient transfer-matrix method framework for optical simulations
Basic Info
- Host: GitHub
- Owner: JaxLayerLumos
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://jaxlayerlumos.github.io
- Size: 43.9 MB
Statistics
- Stars: 15
- Watchers: 2
- Forks: 3
- Open Issues: 5
- Releases: 6
Metadata Files
README.md
JaxLayerLumos: A JAX-based Differentiable Optical and Radio Frequency Simulator for Multilayer Structures
Overview
JaxLayerLumos is open-source transfer-matrix method (TMM) software designed for scientists, engineers, and researchers in optics and photonics. It provides a powerful yet intuitive interface for calculating the reflection and transmission (RT) of light through multi-layer optical structures. By inputting the refractive index, thickness of each layer, and the frequency vector, users can analyze how light interacts with layered materials, including the option to adjust for incidence angles. Our mission is to offer a lightweight, flexible, and fast alternative to commercial software, enabling users to perform complex optical simulations with ease. JaxLayerLumos is built with performance and usability in mind, facilitating the exploration of optical phenomena in research and development settings.
Features
- Lightweight and Efficient: Optimized for performance, JaxLayerLumos ensures rapid calculations without the overhead of large-scale commercial software.
- Gradient Calculation: Calculates the gradients over any variables involved in RT, powered by JAX.
- Flexibility: Accommodates a wide range of materials and structures by allowing users to specify complex refractive indices, layer thicknesses, and frequency vectors.
- Angle of Incidence Support: Expands simulation capabilities to include angled light incidence, providing more detailed analysis for advanced optical designs.
- Open Source and Community-Driven: Encourages contributions and feedback from the community, ensuring continuous improvement and innovation.
- Comprehensive Material Database: Includes a growing database of materials with their optical properties, streamlining the simulation setup process.
Installation
JaxLayerLumos can be easily installed by the following command using the PyPI repository.
bash
pip install jaxlayerlumos
Alternatively, JaxLayerLumos can be installed from source.
bash
pip install .
In addition, we support three installation modes, dev, benchmarking, and examples, where dev is defined for installing the packages required for development and software testing, benchmarking is for installing the packages required for benchmarking against differnt TMM software programs, and examples is needed for running the examples included in the examples directory.
One of these modes can be used by commanding pip install .[dev], pip install .[benchmarking], or pip install .[examples].
Examples
A collection of examples in the examples directory exhibits various use cases and capabilities of our software.
We provide the following examples:
- Reflection Spectra over Wavelengths Varying Incidence Angles
- Color Conversion
- Color Exploration with Thin-Film Structures
- Gradient Computation
- Visualization of Light Sources
- Plotting of Optical Constants
- Thin-Film Structure Optimization with Bayesian Optimization
- Thin-Film Structure Optimization with DoG Optimizer
- Reflection Spectra over Frequencies for Radar Design
- Analysis of Solar Cells
- Transmission Spectra over Wavelengths Varying Thicknesses
- Triple Junction Solar Cells
Comparison of TMM Packages
We compare Ansys Optics, TMM-Fast, and tmm to our software.
| Feature | Ansys Optics (stackrt) | TMM-Fast (PyTorch/NumPy) | tmm (Pure Python) | JaxLayerLumos (JAX) | |-----|-----|-----|-----|-----| | Lightweight | ❌ Bulky | ✅ | ✅ | ✅ | | Speed | 🟨 Moderate | ✅ Fast | 🟨 Moderate | ✅ Fast | | Gradient Support | ❌ | ✅ | ❌ | ✅ | | GPU Support | ❌ | ✅ | ❌ | ✅ | | TPU Support | ❌ | ❌ | ❌ | ✅ | | Position-Dependent Absorption | ❌ | ❌ | ✅ | ✅ | | Optical Simulations | ✅ | ✅ | ✅ | ✅ | | Infrared Simulations | 🟨 Limited | 🟨 Limited | ❌ | ✅ | | Radio Wave Simulations | 🟨 Limited | ❌ | ❌ | ✅ Handles magnetic materials | | Open Source | ❌ Commercial | ✅ MIT | ✅ BSD-3-Clause | ✅ MIT |
Benchmarking against Other Software
We benchmark JaxLayerLumos against other software. Detailed benchmarking results can be found in COMPARISONS.md. These comparisons include the results of Ansys Optics, TMM-Fast, and tmm.
To obtain these results, you should install additional required packages. Before installing the packages, you should install PyTorch first. In particular, if you need the CPU version of PyTorch, you can install it using the following command.
bash
pip install torch --index-url https://download.pytorch.org/whl/cpu
For details, you can refer to the official instruction of PyTorch. Then, the required packages can be installed by the following command.
bash
pip install .[benchmarking]
Finally, you can run the benchmarking code compare_methods.py in the benchmarking directory.
Software Testing and Test Automation
We provide a variety of test files in the tests directory.
Before running the test files, the required packages should be installed by using pip install .[dev].
They can be run by commanding pytest tests/.
Moreover, these test files are automatically tested via GitHub Actions, of which the configuration is defined in .github/workflows/pytest.yml.
Supported Materials
Materials supported by our software are described in MATERIALS.md.
JaxLayerLumos includes a growing library of materials, which are specified using either complex refractive indices or complex permittivities and permeabilities, which can be sourced from the literature or specified by users based on experimental data. When only complex refractive indices are provided, magnetic effects are assumed to be negligible, and the relative permeability is set to unity ($\mu_{r,j} = 1$), an assumption typically valid at optical frequencies. In the RF and microwave regimes, the electromagnetic properties of metals are derived from their electrical conductivity and magnetic susceptibility, while dielectrics are generally modeled with constant permittivity and negligible loss.
Contributing Guidelines
To contribute, please read CONTRIBUTING.md for our guidelines on issues, enhancements, and pull requests. Follow the outlined standards to keep the project consistent and collaborative.
License
JaxLayerLumos is released under the MIT License, promoting open and unrestricted access to software for academic and commercial use.
Acknowledgments
- We sincerely thank all contributors and users for your support and feedback.
- This work is supported by the Center for Materials Data Science for Reliability and Degradation (MDS-Rely), which is the Industry-University Cooperative Research Center (IUCRC) of National Science Foundation.
- The University of Pittsburgh, Case Western Reserve University, and Carnegie Mellon University are participating institutions in MDS-Rely.
Owner
- Name: JaxLayerLumos
- Login: JaxLayerLumos
- Kind: organization
- Location: United States of America
- Repositories: 1
- Profile: https://github.com/JaxLayerLumos
JOSS Publication
JaxLayerLumos: A JAX-based Differentiable Optical and Radio Frequency Simulator for Multilayer Structures
Authors
Department of Chemical Engineering, University of Pittsburgh, Pittsburgh, PA 15261, United States of America
Tags
JAX optics photonics radio frequency transfer-matrix method simulation differentiable programming inverse design machine learningGitHub Events
Total
- Create event: 9
- Issues event: 14
- Release event: 2
- Watch event: 8
- Delete event: 3
- Issue comment event: 31
- Member event: 1
- Push event: 314
- Pull request event: 6
- Fork event: 2
Last Year
- Create event: 9
- Issues event: 14
- Release event: 2
- Watch event: 8
- Delete event: 3
- Issue comment event: 31
- Member event: 1
- Push event: 314
- Pull request event: 6
- Fork event: 2
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Jungtaek Kim | j****m@p****u | 253 |
| Paul Leu | p****u@p****u | 42 |
| Mil152 | m****2@p****u | 10 |
| Jungtaek Kim | j****m@w****u | 6 |
| Mil152 | 7****2@u****m | 6 |
Issues and Pull Requests
Last synced: 5 months ago
All Time
- Total issues: 10
- Total pull requests: 4
- Average time to close issues: 19 days
- Average time to close pull requests: 41 minutes
- Total issue authors: 4
- Total pull request authors: 1
- Average comments per issue: 2.8
- Average comments per pull request: 0.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 10
- Pull requests: 3
- Average time to close issues: 19 days
- Average time to close pull requests: about 1 hour
- Issue authors: 4
- Pull request authors: 1
- Average comments per issue: 2.8
- Average comments per pull request: 0.0
- Merged pull requests: 3
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- pleu (3)
- arendMoerman (3)
- brandondube (2)
- NN708 (2)
Pull Request Authors
- jungtaekkim (4)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 78 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 6
- Total maintainers: 1
pypi.org: jaxlayerlumos
A JAX-based efficient transfer-matrix method framework for optical simulations
- Homepage: https://github.com/JaxLayerLumos/JaxLayerLumos
- Documentation: https://jaxlayerlumos.readthedocs.io/
- License: MIT
-
Latest release: 0.3.3
published 11 months ago
Rankings
Maintainers (1)
Dependencies
- jax *
- jaxlib *
- numpy *
- scipy *
- actions/checkout v2 composite
- actions/setup-python v2 composite