Git Product home page Git Product logo

rainbow-utils's Introduction

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.

rainbow-utils's People

Contributors

alihakimtaskiran avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

msteib

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.