MLResearchAtOSRAM / tmm_fast

tmm_fast is a lightweight package to speed up optical planar multilayer thin-film device computation. Developed by Alexander Luce (@Nerrror) in cooperation with Heribert Wankerl (@HarryTheBird).
MIT License
53 stars 22 forks source link

It works only with GPU #6

Closed tommasogiannantonio closed 1 year ago

tommasogiannantonio commented 1 year ago

Hi, if I try to run the demo script example_tmm.py in a CPU-only environment, the following error appears: AssertionError: It's not clear which beam is incoming vs outgoing. Weird index maybe?

Is there any suggested fix or workaround? Thanks!

MLResearchAtOSRAM commented 1 year ago

This error typically appears when the first or the last layer has a non-zero complex refractive index. Unfortunately, this is a limitation of the transfer matrix method and not a bug in the software. Can you show me an example of layer thicknesses and refractive index for which the error appears?