PyEllips / pyElli

An open source ellipsometry analysis tool for reproducible and comprehensible building of optical models.
https://pyelli.readthedocs.io
GNU General Public License v3.0
17 stars 6 forks source link

Fix Bruggeman EMA #173

Closed MarJMue closed 2 months ago

MarJMue commented 3 months ago

The selection of the correct root in the Jansson algorithm was faulty.

This PR fixes one bug in the algorithm, but some numerical problems persist. Additionally, a new method got implemented which seems to be more stable.

ToDo:

MarJMue commented 2 months ago

I have found the mistake for the new algorithm, and it seems to work in all cases I have tested. (TIL sqrt(a/b) =/= sqrt(a) / sqrt(b) for complex numbers... Should have known better...)

I have subsequently disabled the old code path, as I could not find the error until now.

We might consider disabling the mixture tests or marking them as slow, as they take some time to finish.