garrekstemo / transfermatrix.jl Goto Github PK
View Code? Open in Web Editor NEWA general 4x4 transfer matrix for optical waves in layered media for Julia
Home Page: https://garrek.org/TransferMatrix.jl/
License: MIT License
A general 4x4 transfer matrix for optical waves in layered media for Julia
Home Page: https://garrek.org/TransferMatrix.jl/
License: MIT License
StaticArrays.jl would be more efficient than native Julia arrays.
Calculate the refractive index from a dispersion formula using RefractiveIndex.jl when loading data.
The database at refractiveindex.info has been updated, changing the table structure when downloading refractive index data. This has caused the read_refractive()
function to break.
Either warn the user to reformat the file, fix this function, or use RefractiveIndex.jl.
Argument information is missing in the docs for the Layer and Structure types.
Right now the transfer matrix method is used. While the current research in transfer matrices tries to mitigate its shortfalls (singularities and numerical instabilities), scattering matrices avoid these from the start. It would probably be more efficient and definitely more broadly useful to the photonics community to use scattering matrices instead of transfer matrices. In any case, once the transfer matrix is calculated, the scattering matrix elements are still calculated in the end to get transmission and reflection. (see this discussion)
Proposal: keep the current transfer matrix code, but write a scattering matrix implementation and have both available.
Make this the default instead of requiring the user to type 1
.
For easy transport of complicated Structure
s
Looking through your code, it looks like in your 4x4 transfer matrix formulation has a opposite ordering to Yeh' s book p246 - 247. (Yeh Pochi. 2005. Optical Waves in Layered Media. Hoboken NJ: Wiley.) In Yeh's book, he ordered the s-pol in the upper half of the vector and p-pol in the lower, while your implementation seems to reverse such ordering and hence, your s, p subscripts are swapped compared with Eq. (9.7-23) - (9.7-30) in Yeh's book. I guess it may be helpful to include that in the documentation to avoid confusion? Maybe something like Eq. (9.7-22) in Yeh's book but with your ordering scheme would suffice as a clarification? Thank you.
@JuliaRegistrator register
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
@JuliaRegistrator register
@JuliaRegistrator register
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.