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 |
|