-
Notifications
You must be signed in to change notification settings - Fork 634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inconsistent gradients with fd simulations #2106
Comments
Sure but meep/python/tests/test_adjoint_jax.py Lines 168 to 179 in 91d36ba
|
Also see #1541. Despite the tests checking different values for the forward source bandwidth, this still seemed to be an issue for me and I had trouble pinning it down. |
Actually, I realized that the issue is about the bandwidth of the adjoint source, i.e. the hardcoded 0.1 here: meep/python/adjoint/objective.py Line 102 in 619c879
In this case, #1515 and the tests are probably irrelevant, because they are about the bandwidth of the forward source. I did some more tests, and found something similar to what was originally suggested in #1507 (comment). The additional phase for adjoint source is |
Hi all,
I have a question about the scaling factor for setting adjoint sources. I found it was set to meep.GaussianSource(fcen, fwidth=0.1*fcen) for the testing example (see code link below). then, I did a robust test by tuning this bandwidth factor. The scaling factor turns out to be very sensitive to the bandwidth. It seems that the adjoint field E_adj are really different by a phase factor. and the phase factor is not well considered for adjoint sources at several different bandwidth.
Structure, monitor, and source setting
Test
df is a factor for the adjoint source profile meep.GaussianSource(fcen, fwidth=df*fcen).
Code in python library
Code: https://nbviewer.org/github/NanoComp/meep/blob/master/python/examples/adjoint_optimization/01-Introduction.ipynb
Meep version: 1.18.0, 1.19.0, 1.20.0, 1.21.0, 1.22.0, 1.23.0
The text was updated successfully, but these errors were encountered: