Commit Graph

  • e46c3ebec3 export notebook pdf main Edoardo Vergerio 2026-08-28 16:29:03 +02:00
  • 2bc3d91085 repo cleanup Edoardo Vergerio 2026-08-28 16:13:43 +02:00
  • 1e1f75c2bf added k-fold cross validation in the EGO surrogate modeling. full_meta.ipynb implementes the full FDTD simulation domain (Tidy3D) for the device and produces some result plots in comparison to the ASM model Edoardo Vergerio 2026-08-28 16:10:53 +02:00
  • b9b64c05ab export notebook pdf Edoardo Vergerio 2026-08-24 17:29:45 +02:00
  • d928584554 added a notebook to verify the full symmetric phase masks and propagation. A comparison between ASM and FDTD is made. The comparison is ideal in the sense that phase masks are implemented assuming unitary transmission. Although not realistic in practice, it is good to compare the results obtained from the two methods. Next steps will require simulating the phase mask as a true metasurface made of nano-pillars. Edoardo Vergerio 2026-08-24 17:27:50 +02:00
  • 7a37ba4f0e far field plane increase Edoardo Vergerio 2026-08-24 08:32:06 +02:00
  • 87d8d7f15c added results from symmetric simulations Edoardo Vergerio 2026-08-23 18:32:33 +02:00
  • 7380eabf54 parameter change and minor modifications Edoardo Vergerio 2026-08-23 18:17:16 +02:00
  • 0b9dfffe89 added full_meta_meep and meep_fullmeta_propagation which contain first attempts at using meep for computing the whole system. At first, we check propagation using meep_fullmeta_propagation and will later introduce pillars after verification. Edoardo Vergerio 2026-08-23 18:13:34 +02:00
  • 00a1a802c3 introduced a setting to fix the maximum diameter of metasurfaces. Practically this is translated into an additional constraint on the optimization algorithm that fixes to zero the degrees of freedom that are outside the designated region. Overall, the number of pixels does not change to guarantee sufficient padding for the fft. Added metaprop_fibermode_doublet_ego_sym.py that implements the ego optimization for finding the optimal distance values under mirror boundary conditions. Edoardo Vergerio 2026-08-22 10:32:06 +02:00
  • 367ffc3457 modified metaprop_fibermode_doublet.py with the introduction of an utility function to compute the input field by propgating the source field of a desired propagation distance. This is useful in simulations when setting up custom sources. Added full_meta.ipynb which implements the full first metasurface, truncating the substrate with a custom source and computing the fields just before MS2 using projection monitors Edoardo Vergerio 2026-08-21 17:43:15 +02:00
  • 71c4edf538 improved handling of mirror-symmetry boundary conditions Edoardo Vergerio 2026-08-20 18:15:33 +02:00
  • d76d8a493c repo cleanup Edoardo Vergerio 2026-08-19 17:50:59 +02:00
  • e63c11ea58 repository update. Added metaprop_fibermode_doublet_sym.py which implements a constrained optimization enforcing mirror symmetry about the x and y axes. Mirror symmetry can be exploited in this problem since the target mode has such symmetry. Each metasurface has effectively a quarter of the degrees of freedom compared to the unconstrained problem. Edoardo Vergerio 2026-08-19 17:48:11 +02:00
  • 5ca4f4045a code uniformity across versions edoardo 2026-07-30 21:18:26 +02:00
  • a315e70576 repo cleanup edoardo 2026-07-29 22:11:49 +02:00
  • 7d827aa5ff added unit_cell_meep, a meep notebook dedicated to the simulation of unitcells edoardo 2026-07-29 21:56:09 +02:00
  • 361af92eed modified update function to include variables that were previously not included but that should also be updated at every distance change. edoardo 2026-07-29 16:29:00 +02:00
  • 41c02ad0b0 added ego implementation used to discover the optimal set of distance parameters that define the system's geometry edoardo 2026-07-29 14:44:07 +02:00
  • 36c1db0df2 code alignment between the two versions. There are now two possibilities: 1)optimize the average objective function, this generally leads to different performance of the converted modes; 2) optimize using an epigraph formulation. This assures that whatever the final epigraph value, the performance of the converted modes will be greater (in terms of mode overlap) than the epigraph itself. The epigraph is implemented as a constrained optimization, which is stricter than optimizing the average edoardo 2026-07-28 22:41:42 +02:00
  • ebcaeb5643 fixed the epigraph formulation, which consisted in correcting the sign of the gradients to comply with the definition of epigraph minmax problem. See notes on the epigraph formulation for further explanations. edoardo 2026-07-28 13:18:22 +02:00
  • 9eb682d706 parameter change edoardo 2026-07-17 11:25:48 +02:00
  • 9020feadf2 modified polar plots for target and output modes edoardo 2026-07-17 11:10:35 +02:00
  • 9da2beaf75 minor changes to plots and parameters edoardo 2026-07-16 08:49:54 +02:00
  • 6260bbac4b added metaprop_fibermode_doublet_multi which implements a multiplexer. In practice, two out-of-axis sources propagate through the metasurface doublet and reach the output plane as two distinct orthogonal fiber modes. For example, one source is converted to an LP11 and the other to an LP21. This is obtained by optimizing the average of the overlap of the two modes separately. edoardo 2026-07-15 15:28:54 +02:00
  • 9fbb398592 added metaprop_fibermode_doublet_shiftSource that introduces some modifications needed to properly account for out-of-axis excitations. Initially, it was observed that previous code was only capable of optimizing an on-axis source to an on-axis target. If for example the source was shifted away from the center, then the optimization would fail. Even if the target was shifted out-of-axis to match the position of the source, the algorithm would not work. Several bugs produced this issue. The first was related to how the theoretical model was translated to code, in particular how we handled gradient calculations. In theory, we considered column vectors, for which taking the transpose simply turns them into row vectors but does not change the element wise product. In the code, we instead deal with 2D arrays, and at that point transposing is no longer irrelevant. Check notes for more details about this bug. The second bug was related to how we handle FFTs. In particular, the simulation space is centered in the center of the array. FFTs work considering that the signal starts at the corners. This center mismatch did not cause any issue for the on-axis case, due to the symmetry of the problem. We did not observe both of these two bugs because in the on-axis case everything is centered. edoardo 2026-07-14 17:13:02 +02:00
  • fb55b76485 added metaprop_fibermode_doublet_epigraph which implements the epigraph formulation of the problem to handle multiplexing edoardo 2026-07-06 10:22:23 +02:00
  • f6fd791fff general testing of parameters. Regarding metaprop_fibermode_doublet, the spatial sampling has been fixed and the grid size is controlled by the number of pixels. I have seen that the mask-mask and mask-output plane distance is crucial and should not be chosen randomly, at the moment i have tested empirically some dimensions. The parameters in this commit seem to work ok, but we need to understand. Then, intensity conversation is still an issue, since the pattern at the output has 95/100, meaning 5/100 is lost somewhere. We really need to understand if this is an issue or not. With these settings, we might want to increase the window size, but then see the next point. I have introduced boundary boxes on phase masks, this is to avoid the algorithm using pixels that are clearly outside and only see noise. If we extend the simulation domain, we ought to extend these boundaries, otherwise the issue will present itself again. For what pixelation is concerned, honestly i expected worse, though there is still the need to apply some kind of filter to eradicate spurious single pixels. That should be doable using autograd, since the heavylifting is done by the adjoint, using autograd just for the filter part should not require too much computing effort. This needs to be tested. edoardo 2026-06-19 17:17:45 +02:00
  • 3276b3991c modified parameters for testing edoardo 2026-06-19 13:46:30 +02:00
  • f99dc5308e modified parameters for testing edoardo 2026-06-19 13:40:43 +02:00
  • 0d8c90c7fb modified parameters for testing edoardo 2026-06-19 13:38:07 +02:00
  • b57ec8e757 added metaprop_asm.py used to test the angular spectrum method edoardo 2026-06-19 13:37:41 +02:00
  • 1668de238d changing the grid system requires using a larger beamwaist for the input field. Effectively, the larger beam incides onto a larger number of unit-cells edoardo 2026-06-18 21:00:51 +02:00
  • 5e7ad710ba params. fix edoardo 2026-06-18 17:44:01 +02:00
  • a008cada72 more testing on grid size and propagation distances edoardo 2026-06-18 17:39:32 +02:00
  • b7271ffdf9 increasing domain size for testing edoardo 2026-06-18 14:04:06 +02:00
  • e275ea610b parameter change for testing edoardo 2026-06-18 11:48:30 +02:00
  • 24f3f24e5d code improvements and cleanup after introducing fftw edoardo 2026-06-18 10:45:31 +02:00
  • dee7bc9c8f fixed variable names edoardo 2026-06-17 14:18:31 +02:00
  • a87258a9c5 testing pyfftw edoardo 2026-06-17 13:49:25 +02:00
  • 93be0f6954 added timestamps for evaluation edoardo 2026-06-17 10:43:26 +02:00
  • e5ae6f6cf2 added metaprop_fibermode_doublet.py which implements the angular spectrum method, together with the adjoint formulation to simulate a metasurface doublet edoardo 2026-06-17 08:36:08 +02:00
  • 034f6c83c7 modified filter parameters. Using a conic filter with radius 0.5 edoardo 2026-06-05 08:32:06 +02:00
  • 1f3e3d5775 uniform filter with radius 1 edoardo 2026-06-04 17:07:50 +02:00
  • 54de099e46 added fiber_modes.ipynb useful utility to compute fiber modes edoardo 2026-06-04 14:29:31 +02:00
  • dae3d64b74 added metaprop_ad.py for testing automatic differentiation and conic filtering edoardo 2026-06-04 14:16:47 +02:00
  • 9b6842a061 added metaprop, implementing adjoint inverse design through the angular spectrum method edoardo 2026-06-02 23:17:21 +02:00
  • 15a1f59be6 fixed plots between epochs edoardo 2026-05-31 10:51:01 +02:00
  • 5523439021 I have seen that the first naive version does not converge well in the dft fields. So in the mean time I am running this version which outputs data more frequenctly edoardo 2026-05-30 22:36:03 +02:00
  • 4579f8544f updated parameters edoardo 2026-05-30 15:53:52 +02:00
  • 5ca07a7062 added metapeg_v2_unc.py, which is a naive implementation of topology optimization without filtering and projecting, which is useful to test the objective function alone and understand if the algorithm can produce the intended result under the most relaxed conditions (no binarization) edoardo 2026-05-30 15:52:30 +02:00
  • c9df747f4f solved conflict on folder creation among multiple processes edoardo 2026-05-29 14:42:29 +02:00
  • 5b18e7bce7 after the first tests, I increase the number of iterations per epoch edoardo 2026-05-29 14:29:30 +02:00
  • d01f28dab3 parameter change for testing edoardo 2026-05-27 14:58:10 +02:00
  • 1af0b18baf parameter change for testing edoardo 2026-05-27 14:55:58 +02:00
  • a283be231c 1) minor changes to metapeg_v2, but we no longer modify the chunk property and leave it to the default value (=True). Setting it to False causes segmentation errors in the adjoint loop, but works for direct simulations (for example in the normalization run) 2) added sim_opt_design, which is used to simulate an optimized design given the values of an optimized MaterialGrid after and outside the main optimization algorithm edoardo 2026-05-27 14:55:09 +02:00
  • 1fafc62824 trying split_chunks_evenly=True, previously it was set to false edoardo 2026-05-27 10:04:15 +02:00
  • caf555d248 testing for NaN edoardo 2026-05-27 09:27:44 +02:00
  • 7f8d9492d5 testing again for segm. errors. edoardo 2026-05-27 09:14:13 +02:00
  • 72517172c2 increased solution time for testing edoardo 2026-05-26 22:48:00 +02:00
  • df865759c3 increased resolution for testing edoardo 2026-05-26 13:43:00 +02:00
  • b21083f491 modified reshaping to automatically account for correct dimensions edoardo 2026-05-26 13:41:32 +02:00
  • 56d84e4c2f testing increasing resolution edoardo 2026-05-26 10:18:07 +02:00
  • 70a5391762 more debugging edoardo 2026-05-26 10:09:25 +02:00
  • f1a6fd25ab changed parameters for easier debugging edoardo 2026-05-26 08:50:50 +02:00
  • 249d39aa73 added faulthandler for testing edoardo 2026-05-26 08:43:49 +02:00
  • 2cfce678a3 testing for segmentation faults edoardo 2026-05-26 08:41:58 +02:00
  • 7f362f3e47 trying to lower resolution of design region to the same as the physics edoardo 2026-05-25 17:21:44 +02:00
  • c27f5a3896 another parameter test edoardo 2026-05-25 16:44:50 +02:00
  • 7039997fbd testing fields again edoardo 2026-05-25 15:38:48 +02:00
  • 1311203563 param. update edoardo 2026-05-25 14:41:00 +02:00
  • d113f54164 add field plot utilities for normalization run edoardo 2026-05-25 14:30:01 +02:00
  • 3be89321ee the stop condition on the normalization run needs to be better analyzed. Specifically, we should understand where to position the monitor point. Before, it was in a far field point, outside the simulation cell. I've seen the simulation does not converge, at first glance. Now I'll try position it in a real physical point inside the cell. Let's see if it converges in a different way. edoardo 2026-05-24 22:45:15 +02:00
  • 10db14256e minor changes edoardo 2026-05-24 21:00:07 +02:00
  • b6f36ecaa7 parameter update edoardo 2026-05-24 18:20:37 +02:00
  • 762938960a modified version of metapeg, using epigraph and linewidth/spacing constraints edoardo 2026-05-24 17:47:07 +02:00
  • af4c538b36 first debug on metapeg. At the moment there is only one frequency being optimized. Although we are not using the epigraph yet, it would still be convenient to still consider a small range around the central frequency and optimize the average objective between them. This would still be better than considering only one frequency, but for the moment I need to understand if this model can work or not. Before running a full batch, more debugging is required to better understand how everything works. In this release, the code has not been tested in the results part, but the main optimization function run a couple of rounds without throwing errors. We still need to assure the normalization we make on the far fields is reasonable or not. The next step is to run a dummy simulation until the end and observe the results generation works, then the true test would be to let it run a true optimization with the right resolution. edoardo 2026-05-13 22:43:54 +02:00
  • 1101a53d3a added metapeg.py, used to inversely design a metasurface that generates a desired far-field intensity pattern edoardo 2026-05-13 16:55:46 +02:00
  • 32503e330c fixed observed far-field component edoardo 2026-05-13 10:43:51 +02:00
  • 3cdb9e5f68 increase sim time to 1500 edoardo 2026-05-13 00:13:45 +02:00
  • dceb2631f2 fixing plots edoardo 2026-05-13 00:04:27 +02:00
  • c3138ae776 fixed generation of results folder edoardo 2026-05-12 23:40:32 +02:00
  • 005b69cec4 first commit edoardo 2026-05-12 23:13:08 +02:00