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
52 stars 22 forks source link

Implementation of an equivalent to tmm.tmm_core.inc_tmm() #16

Open superluminescent opened 1 year ago

superluminescent commented 1 year ago

Hi again, I was wondering if there are any plans to implement a vectorized version of the "incoherent, or partly-incoherent-partly-coherent, transfer matrix method" as implemented in the original tmm package by S. Byrnes?

For one of my projects, I reproduced the original functionality for a particular case (fitting to FTIR data of a DBR on a thick bulk slab, with vacuum as a sub- and superstrate).

I imagine that the partly-coherent method might benefit people in similar use cases, both in measurement and simulation.

My crude implementation already resulted in a considerable speed improvement compared to the original tmm code. If you're interested, I could take a deeper dive to generalize and optimize the code further for a possible contribution to tmm_fast.

I'm open to discussing this further should you be interested.

Best, superluminescent

pwilliam123 commented 11 months ago

Hi, @superluminescent I'm interesting in the vectorized version of the "incoherent, or partly-incoherent-partly-coherent, transfer matrix method", is there any source that you could share ?

Nerrror commented 11 months ago

@superluminescent the incoherent method is now implemented in the develop branch and should work. I haven't tested gradients yet but the reflectivitiy and transsmissivity computation seems correct.

@pwilliam123 in this paper, S. Byrnes explains how the coherent and also incoherent mehtod works. The tmm-fast implementation also follows his naming convention, so if you're interested you should see the similarities