Closed wschmail closed 5 months ago
Hi,
Thank you for pointing this out. This is issue is due to the fact that I did not consider lossy substrates and superstrates. What the algorithm does is take only the real part of the refractive index for the substrate and superstrate. For substrates with significant loss, this naturally leads to an incorrect interface reflection.
I have committed a solution to the master branch: https://github.com/jonschlipf/RigorousCoupledWaveAnalysis.jl/commit/b013a081d65c2ef2e185015afa07301170b6f8a6
It appears to make your minimum example work, giving the result of your Model_2 plot and agreeing nicely with the Filmetrics online calculator. You can get the new changes by installing the package via the github URL instead of the julia registry. If you have time, please test it. I am planning a new official release by the end of the month, so this will be included if it works well.
By the way, if you want to solve 1D systems without lateral structuring, you could also compute with N=0 instead of N=1 for a tiny bit of speed.
I changed the line of code in Common.jl that you suggested, and now both models give exactly the same results. Thanks for the quick response and fix!
Hi,
Thanks for creating this nice Julia package!
I have tried a few structures and stumbled upon an example where the results seem counterintuitive. Maybe I'm not defining it correctly, or maybe it's a bug.
Below is the MWE:
As I understand it, both model definitions should result in the same reflectance values. Am I doing something wrong?
Thanks!