GithubHelp home page GithubHelp logo

pymatj / pygtm Goto Github PK

View Code? Open in Web Editor NEW
14.0 1.0 4.0 937 KB

Python-based Generalized Transfer Matrix method for light propagation in arbitrary anisotropic multilayer stacks

License: GNU General Public License v3.0

Python 100.00%

pygtm's Introduction

Welcome to GTM documentation

This program implements the generalized 4x4 transfer matrix (GTM) method poposed in Passler, N. C. and Paarmann, A., JOSA B 34, 2128 (2017) and corrected in Passler, N. C. and Paarmann, A., JOSA B 36, 3246 (2019). A Matlab code can be downloaded on zenodo.

As of March 2020, it furthers implements the layer-resolved absorption method proposed in Passler, N. C., Jeannin, M. and Paarmann, A., A Matlab code is also available for this update on zenodo.

This Python implementation also relies on inputs from D. Dietze's FSRStools code https://github.com/ddietze/FSRStools

Please cite the associated publications if you use this code.

author: Mathieu Jeannin
email: [email protected]
affiliations: Laboratoire de Physique de l'Ecole Normale Superieure (2019)
Centre de Nanosciences et de Nanotechnologies (from 2020)

Installation

You should be able to install using pip install . or running python setup.py install, from the project root directory. Otherwise just copy the GTM folder somewhere where python will find it or add the path to your PYTHONPATH variable.

Prerequisite: NumPy, SciPy, Matplotlib

Documentation

See the manual on Read The Docs for the documentation.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Copyright (C) Mathieu Jeannin 2019-2023 [email protected].

pygtm's People

Contributors

pymatj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pygtm's Issues

Detection of birefringes

Hi again,

a question regarding the sorting of the qs:

if np.abs(Cp_t1-Cp_t2) > qsd_thr: ## birefringence

this statement is used to detect birefringes for a layer and to decide if eq (13) or (15) is used for qualculation of the Cps.

I am wondering if the birefringes criterium for a single layer can't be done by checking for off-diagonal elements in the Euler-transformed epsilon 3x3 matrix?

in the best case one saves to calculate Cp_t1 and Cp_t2 and it would be also more simple and intuitive in my opinion.

Best

Daniel

sort berremann qi's according to (12)

Hi @pyMatJ ,

I am currently checking the GTM core code I stumbled a bit over this code here:

pyGTM/GTM/GTMcore.py

Lines 461 to 477 in 1f62af2

## sort berremann qi's according to (12)
if any(np.abs(np.imag(qsunsorted))):
for km in range(0,4):
if np.imag(qsunsorted[km])>=0 :
transmode[kt] = km
kt = kt + 1
else:
reflmode[kr] = km
kr = kr +1
else:
for km in range(0,4):
if np.real(qsunsorted[km])>0 :
transmode[kt] = km
kt = kt + 1
else:
reflmode[kr] = km
kr = kr +1

Shouldn't the if-else-case be within the for loop .
As I understood it, you need to sort according to the four cases:

  1. complex number with imaginary part >= 0: transmode[0]
  2. real number with >= 0: transmode[1]
  3. complex number with imaginary part < 0: reflmode[0]
  4. real number with < 0: reflmode[1]

Maybe you can check and tell me the idea of the current code.

Thanks

Daniel

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.