12 Commits
Author SHA1 Message Date
Edoardo Vergerio 625cd64f53 implemented new filtering system based on a Filter Class. Previously, filtering was made expensive by extreme padding, now this has been fixed by choosing a more appropriate padding size. The gradient chain based on unitcells has been implemented but the results have yet to be tested using FDTD, which will be the next step. Added some utilities to visualize the effect of filter radius on given input masks and added all data concerning unit cell simulations. Still to be done is to fix materials in the MEEP simulations, so as to account for true material behavior instead of relying on constant refractive indices. 2026-10-14 16:40:05 +02:00
Edoardo Vergerio 7a71b43b72 first introduction of optimization with respect to geometrical parameters, instead of phase. This requires an additional differentiation layer that is computed directly from unit cell numerical data. 2026-10-13 09:19:04 +02:00
Edoardo Vergerio 441510e246 added test_gres.py as a first attempt at implementing a cavity based metasurface. It uses a stacked metasurface setup as a hotstart for a subsequent optimization of the cavity phase parameters. Effectively, a folded setup is convenient for the reason being that no alignment of subsequent masks is required. 2026-10-10 00:19:35 +02:00
Edoardo Vergerio e1703ffdf0 fixed conflict on spatial dimensions and filtering 2026-10-07 14:06:30 +02:00
Edoardo Vergerio bb2544954e added mpid support for three layer stacks. Added sorter_to_gauss as example usage of the three stack. 2026-10-04 15:33:04 +02:00
Edoardo Vergerio 31859271da several modification introduced: fixed dimensions to micrometers, introduced ego loop 2026-09-21 11:42:22 +02:00
Edoardo Vergerio 5f88780426 modified mpid to use filtering on the phase mask parameters. Automatic differentiation is used to correctly compute gradients. Moreover, the optimization can down be carried out according to different strategies, which can either be: average the objectives, use an epigraph reformulation. The epigraph formulation needs further attention because it does not always leed to good results. A possible solution might be a combination of the two strategies: at the beginning use an average cost function to set up the problem and then switch to an epigraph. This would be like an hot start strategy, since I have noticed the epigraph being not totally capable of handling the problem well if it starts from scratch. On the other hand, the use of the filtering action can even leed to better results than without it, although it is necessary to tune the filter radius. I have seen that even a 1um radius is generally sufficient to remove outliers in the final phase mask, which was the main reason we decided to implement the filter in the first place. In the end, the all defined classes assume we interface to them using dimensions in micrometers. Conversion to meters is handled internally. 2026-09-11 14:45:35 +02:00
Edoardo Vergerio 45492233d4 implemented and did some testing about applying a conic filter on phase masks. This should smooth out outliers at the cost of a possible reduction of total overlap efficiency. Several example devices have been added for testing purposes. 2026-09-08 16:56:56 +02:00
Edoardo Vergerio b4e79330b1 implemented conic filtering on phase masks. The purpose of filtering is to remove large spatial variations of phase within the metasurface. On the other hand, the disadvantage of filtering is that high spatial variations might be required to achieve the desired target. A compromise needs to be reached: choose a small enough radius to avoid spurious phase values but that can still yield good overlap values. 2026-09-07 17:10:10 +02:00
Edoardo Vergerio ecffd9d8d9 scripts for testing usage of the mpid class. Shaping the inverse design algorithm into a class has proven useful to streamline the design process. Being more easy to handle, one can now test various devices with very little setup effort. 2026-09-07 13:42:16 +02:00
Edoardo Vergerio 1d843d2553 stable definition of mpid.py. Commit version before testing conic filtering and autograd ad 2026-09-07 13:38:42 +02:00
Edoardo Vergerio b0bfef5d27 first commit 2026-09-03 16:59:35 +02:00