-
Notifications
You must be signed in to change notification settings - Fork 13
add tutorial about source normalization #301
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
base: develop
Are you sure you want to change the base?
Conversation
Spell check passed successfully for 1 notebook(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work @Filipe, this will be a super useful resource - this answers a number of my questions as well!
A couple comments:
-
Above cell 5, it might help to plot a couple of these simulations, so the user can quickly visualize what you're measuring
-
For the plot in cell 21, maybe connect the data points with a line to better illustrate the behavior
-
Above cell 22, a bit more explanation of what the simulation will do will be helpful
Other than that, I think this is great - super clear, illustrative, and useful!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @FilipeFcp . Very helpful content, especially the error on the monitor position, which I didn't realize before.
-
Consider adding doc string to the
get_sim
function since it's relatively long with many arguments. -
For plane wave, "|E_0| is proportional to the source plane area" is incorrect right? |E_0| should be proportional to the area**(-1/2) as the figure below shows?
-
Since we are on this topic, shall we spend some time on custom field source and current source normalization just to make the tutorial complete?
Thanks @FilipeFcp, great stuff! A few comments from my side too:
|
Hi all. @momchil-flex, I did some tests with more angles, and it seems odd. Using 2.9rc, for a plane size of 1 µm: Changing the plane size to 1.5 µm: Is it some issue with the monitor, or should I adapt something in the simulation? The |
Ok, yeah, this is pretty interesting. In some sense it is showing exactly what I wanted to show: that in some cases, especially when the DiffractionMonitor has to differentiate between roughly equal powers going in both directions, the accuracy can get degraded. Notice that the problems are happening exactly beyond TIR when reflection hits 1, meaning that there's exactly equal powers going in each direction, and the flux at that location is 0. The problem is that numerically the flux is rather numerical noise on the scale of Understanding now how everything fits together, my suggestion is to preserve the current behavior. I think the increased accuracy in the "correct" setup is worth the potential decrease in the specific case of a DiffractionMonitor placed in a region with (almost) 0 flux. |
Hi all,
This is the example of source normalization related to issue #900.
Let me know if you think we should add, remove, or modify anything.
It was run using version 2.9-rc.1, with the fixes to the diffraction monitor included.