edoardo
|
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.
|
2026-07-14 17:13:02 +02:00 |
|
edoardo
|
fb55b76485
|
added metaprop_fibermode_doublet_epigraph which implements the epigraph formulation of the problem to handle multiplexing
|
2026-07-06 10:22:23 +02:00 |
|
edoardo
|
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.
|
2026-06-19 17:17:45 +02:00 |
|
edoardo
|
3276b3991c
|
modified parameters for testing
|
2026-06-19 13:46:30 +02:00 |
|
edoardo
|
f99dc5308e
|
modified parameters for testing
|
2026-06-19 13:40:43 +02:00 |
|
edoardo
|
0d8c90c7fb
|
modified parameters for testing
|
2026-06-19 13:38:07 +02:00 |
|
edoardo
|
b57ec8e757
|
added metaprop_asm.py used to test the angular spectrum method
|
2026-06-19 13:37:41 +02:00 |
|
edoardo
|
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
|
2026-06-18 21:00:51 +02:00 |
|
edoardo
|
5e7ad710ba
|
params. fix
|
2026-06-18 17:44:01 +02:00 |
|
edoardo
|
a008cada72
|
more testing on grid size and propagation distances
|
2026-06-18 17:39:32 +02:00 |
|
edoardo
|
b7271ffdf9
|
increasing domain size for testing
|
2026-06-18 14:04:06 +02:00 |
|
edoardo
|
e275ea610b
|
parameter change for testing
|
2026-06-18 11:48:30 +02:00 |
|
edoardo
|
24f3f24e5d
|
code improvements and cleanup after introducing fftw
|
2026-06-18 10:45:31 +02:00 |
|
edoardo
|
dee7bc9c8f
|
fixed variable names
|
2026-06-17 14:18:31 +02:00 |
|
edoardo
|
a87258a9c5
|
testing pyfftw
|
2026-06-17 13:49:25 +02:00 |
|
edoardo
|
93be0f6954
|
added timestamps for evaluation
|
2026-06-17 10:43:26 +02:00 |
|
edoardo
|
e5ae6f6cf2
|
added metaprop_fibermode_doublet.py which implements the angular spectrum method, together with the adjoint formulation to simulate a metasurface doublet
|
2026-06-17 08:36:08 +02:00 |
|
edoardo
|
034f6c83c7
|
modified filter parameters. Using a conic filter with radius 0.5
|
2026-06-05 08:32:06 +02:00 |
|
edoardo
|
1f3e3d5775
|
uniform filter with radius 1
|
2026-06-04 17:07:50 +02:00 |
|
edoardo
|
54de099e46
|
added fiber_modes.ipynb useful utility to compute fiber modes
|
2026-06-04 14:29:31 +02:00 |
|
edoardo
|
dae3d64b74
|
added metaprop_ad.py for testing automatic differentiation and conic filtering
|
2026-06-04 14:16:47 +02:00 |
|
edoardo
|
9b6842a061
|
added metaprop, implementing adjoint inverse design through the angular spectrum method
|
2026-06-02 23:17:21 +02:00 |
|
edoardo
|
15a1f59be6
|
fixed plots between epochs
|
2026-05-31 10:51:01 +02:00 |
|
edoardo
|
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
|
2026-05-30 22:36:03 +02:00 |
|
edoardo
|
4579f8544f
|
updated parameters
|
2026-05-30 15:53:52 +02:00 |
|
edoardo
|
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)
|
2026-05-30 15:52:30 +02:00 |
|
edoardo
|
c9df747f4f
|
solved conflict on folder creation among multiple processes
|
2026-05-29 14:42:29 +02:00 |
|
edoardo
|
5b18e7bce7
|
after the first tests, I increase the number of iterations per epoch
|
2026-05-29 14:29:30 +02:00 |
|
edoardo
|
d01f28dab3
|
parameter change for testing
|
2026-05-27 14:58:10 +02:00 |
|
edoardo
|
1af0b18baf
|
parameter change for testing
|
2026-05-27 14:55:58 +02:00 |
|
edoardo
|
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
|
2026-05-27 14:55:09 +02:00 |
|
edoardo
|
1fafc62824
|
trying split_chunks_evenly=True, previously it was set to false
|
2026-05-27 10:04:15 +02:00 |
|
edoardo
|
caf555d248
|
testing for NaN
|
2026-05-27 09:27:44 +02:00 |
|
edoardo
|
7f8d9492d5
|
testing again for segm. errors.
|
2026-05-27 09:14:13 +02:00 |
|
edoardo
|
72517172c2
|
increased solution time for testing
|
2026-05-26 22:48:00 +02:00 |
|
edoardo
|
df865759c3
|
increased resolution for testing
|
2026-05-26 13:43:00 +02:00 |
|
edoardo
|
b21083f491
|
modified reshaping to automatically account for correct dimensions
|
2026-05-26 13:41:32 +02:00 |
|
edoardo
|
56d84e4c2f
|
testing increasing resolution
|
2026-05-26 10:18:07 +02:00 |
|
edoardo
|
70a5391762
|
more debugging
|
2026-05-26 10:09:25 +02:00 |
|
edoardo
|
f1a6fd25ab
|
changed parameters for easier debugging
|
2026-05-26 08:50:50 +02:00 |
|
edoardo
|
249d39aa73
|
added faulthandler for testing
|
2026-05-26 08:43:49 +02:00 |
|
edoardo
|
2cfce678a3
|
testing for segmentation faults
|
2026-05-26 08:41:58 +02:00 |
|
edoardo
|
7f362f3e47
|
trying to lower resolution of design region to the same as the physics
|
2026-05-25 17:21:44 +02:00 |
|
edoardo
|
c27f5a3896
|
another parameter test
|
2026-05-25 16:44:50 +02:00 |
|
edoardo
|
7039997fbd
|
testing fields again
|
2026-05-25 15:38:48 +02:00 |
|
edoardo
|
1311203563
|
param. update
|
2026-05-25 14:41:00 +02:00 |
|
edoardo
|
d113f54164
|
add field plot utilities for normalization run
|
2026-05-25 14:30:01 +02:00 |
|
edoardo
|
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.
|
2026-05-24 22:45:15 +02:00 |
|
edoardo
|
10db14256e
|
minor changes
|
2026-05-24 21:00:07 +02:00 |
|
edoardo
|
b6f36ecaa7
|
parameter update
|
2026-05-24 18:20:37 +02:00 |
|