You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been playing with this script for a few hours now and have also encountered the "weird refractive index" error when trying to model a HR reflector at 1064 nm. This is just on a standard silica substrate n=1.44 , k = 3E-8 @ 1064 nm .
I am encountering an assertion error when running a multi-wavelength TMM simulation at normal incidence using tmm‑fast. The error arises in the SnellLaw_vectorized function and reads:
AssertionError: It's not clear which beam is incoming vs outgoing. Weird index maybe?
This happens even though my input arrays have the correct shapes. In my case, I am simulating a coating stack with 54 physical layers (plus the incident and substrate media) and specifying two wavelengths (532 nm and 1064 nm). The refractive indices for the layers include very small imaginary components (e.g., 1.45+3e-8j, 1.89+2e-7j), which represent a measured absorption.
the issue seems to arise when i create a substrate with the same level of low absorption. However when i change the properties of the substrate's imaginary parts to zero, the simulation runs successfully.
The text was updated successfully, but these errors were encountered:
the transfer Matrix doesn't support imaginary parts in neither the first or the last layer because it assumes that those layers go towards infinity in thickness. You can circumvent this issues and still get your desired optical behaviour by splitting your final substrate into a final infinitely thick layer without absorption and a very thick one, say >1e0m with low absorption. The fields are then zero when reaching the infinite substrate but you avoid the computational problems with absoprtion in infinite layers
I have been playing with this script for a few hours now and have also encountered the "weird refractive index" error when trying to model a HR reflector at 1064 nm. This is just on a standard silica substrate n=1.44 , k = 3E-8 @ 1064 nm .
I am encountering an assertion error when running a multi-wavelength TMM simulation at normal incidence using tmm‑fast. The error arises in the SnellLaw_vectorized function and reads:
AssertionError: It's not clear which beam is incoming vs outgoing. Weird index maybe?
This happens even though my input arrays have the correct shapes. In my case, I am simulating a coating stack with 54 physical layers (plus the incident and substrate media) and specifying two wavelengths (532 nm and 1064 nm). The refractive indices for the layers include very small imaginary components (e.g., 1.45+3e-8j, 1.89+2e-7j), which represent a measured absorption.
the issue seems to arise when i create a substrate with the same level of low absorption. However when i change the properties of the substrate's imaginary parts to zero, the simulation runs successfully.
The text was updated successfully, but these errors were encountered: