brandondube / prysm

physical optics: integrated modeling, phase retrieval, segmented systems, polynomials and fitting, sequential raytracing...
https://prysm.readthedocs.io/en/stable/
MIT License
269 stars 46 forks source link

thinfilm: allow matrix index and thickness inputs #43

Closed brandondube closed 3 years ago

brandondube commented 3 years ago

At present, users have to write clumsy for i, j, v in enumerate(enumerate(...)) loops to compute 2D arrays of complex reflection/transmission coefficients. It should be possible with a tensordot syntax to perform the appropriate matrix products. This would speed up thin film computations likely by a factor of almost 1,000x for complicated/large structures.

This has use in e.g. coronagraph design.

brandondube commented 3 years ago

doen in a5fa661d6a4e2d0c7de4368d241a691a4369ea82