Rainbow-Utils : Transfer Matrix Method
Project description
Rainbow-Utils
Refraction... It is apparently the most inspiring phenomenon of the light. Rainbow appears with refraction after the rain. We can see all of the vidible spectrum. Wishing to simulate it, Rainbow-Utils was created.
Rainbow-Utils is designed to simulate multi-layer thin film stacks with Transfer Matrix Method (TMM). Layers of thin film materials, ambient and substrate with given εr and µr are simulated with Rainbow-Utils. Moreover, it is compatible with dielectric, magnetic or meta materials.
Tree of The Module
|----Ambient(object)------| | |---__init__(e_r=1, mu_r=1, name='') | |---info | |---__repr__() | | |----ThinLayer(object)----| | |---__init__(thickness, e_r=1, mu_r=1, name='') | |---info | |---__repr__() | | |----Substrate(object)----| | |---__init__(e_r=1, mu_r=1, name='') | |---info | |---__repr__() | | |----Stack(object)--------| |---__init__() |---add(arg) |---stack |---Radiation(wavelenght, theta=0, polarisation_mode='TM') |---render() |---reflectance |---transmittance |---TransferMatrix
Docs
Ambient(e_r=1, mu_r=1, name='')
It defines properties of the ambient where the thin film and substrate is used. e_r is relative permittivity of the material; namely square root of non-magnetic, dielectric materials. e_r may take int, float or complex. mu_r is relative permeability of the material. It may take int, float or complex. Additionaly, name is name of the material. It takes string.
ThinLayer(thickness, e_r=1, mu_r=1, name='')
ThinLayer object defines each of the thin film layers. thickness is thickness of the material with units of meters. It may take a float. e_r is relative permittivity of the material; namely square root of non-magnetic, dielectric materials. e_r may take int, float or complex. mu_r is relative permeability of the material. It may take int, float or complex. Additionaly, name is name of the material. It takes string.
Substrate(e_r=1, mu_r=1, name='')
It defines properties of the substrate where the thin film is coated. e_r is relative permittivity of the material; namely square root of non-magnetic, dielectric materials. e_r may take int, float or complex. mu_r is relative permeability of the material. It may take int, float or complex. Additionaly, name is name of the material. It takes string.
Stack()
It composes the materials. Thin film layers are stacked on a substrate in an ambient with Stack() object.
- add(arg) : Adds a material layer, substrate or ambient to stack object. It may take Ambient, ThinLayer, Substrate or list of these objects Due to the recursion of the functiton, it may take list of tuple of list of materials; namely [A,(B, C, [D, E], F), G, H, I]
- stack : It returns list of repr of added materials.
- Radiation(wavelenght, theta=0, polarisation_mode='TM') : It defines wavelenght, angle and polarisation mode of the radiation. wavelenght is a float and units of it is meters. theta is incident angle and a float, units of it is <radians. polarisation_mode may take whether "TM" or "TE" strings.
- render() : Computes reflectivity, transmittance and transfer matrix of the multilayer media. Don't execute it before calling Radiation()
- reflectance : Returns rendered reflectivity parameter. Don't execute it before calling render()
- transmittance : Returns rendered reflectivity parameter. Don't execute it before calling render()
- TransferMatrix : Returns rendered transfer matrix parameter. Don't execute it before calling render()
References
[1] Liu, Xiaoze, "Control of Exciton Photon Coupling in Nano-structures" (2014). CUNY Academic Works. https://academicworks.cuny.edu/gc_etds/491
[2] Saleh, B. E. A., & Teich, M. C. (2019). Fundamentals of Photonics. Newark: John Wiley & Sons, Incorporated.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file rainbow-utils-2.0.tar.gz
.
File metadata
- Download URL: rainbow-utils-2.0.tar.gz
- Upload date:
- Size: 40.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b45c6169a9c9390ea9c246e432918fc02b9bff50dfe6c15cccb3e1c16861ad22 |
|
MD5 | cd1a968423fe9c64b672d254d4ff6486 |
|
BLAKE2b-256 | cc62eb87edc842d819a5e52d28f578c5cd3291518538d32e49158fca8e70d6c4 |
File details
Details for the file rainbow_utils-2.0-py3-none-any.whl
.
File metadata
- Download URL: rainbow_utils-2.0-py3-none-any.whl
- Upload date:
- Size: 27.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67e228912e21b505580ca4ac49564432234c79aa786e0bb05cfb2edcee1f4da6 |
|
MD5 | 62033892511d425aaaf44fc9accb2578 |
|
BLAKE2b-256 | 3d1df4a9a2a74214d48f554f7028d40db31e8483f58496ccd072999b407078f7 |