-
Notifications
You must be signed in to change notification settings - Fork 3
fix sign error in r_p coefficient. #97
base: master
Are you sure you want to change the base?
Conversation
…ents for TIR cases
ok reading wikipedia more carefully (https://en.wikipedia.org/wiki/Total_internal_reflection#Phase_shifts) |
The way it is implemented looks correct to me. I just don't understand what exactly you mean by "return the negative reflection/transmission coefficient"? |
do not merge, the current implementation is not correct |
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.
Please fix. I don't know how to put this back into a draft version.
If I knew the right answer, I would do it... |
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.
Was this the right answer now?
What is the status of this? Given that the DnR paper is under review, I assume that @cg-laser has worked out the correct solution by now. |
with the DnR we are only testing the eTheta component which is correctly implemented in the master (but not in this pull request). For the ePhi component I'm not so sure |
This one is ancient. And we still don't have the correct solution. Should we move this on an issue instead and close this for now? |
@cg-laser you probably need to make the call on this one ... |
we won't merge this PR but I suggest to leave it open for a future reference on this discussion. |
The calculation of the Fresnel reflection and transmission coefficients are based on https://en.wikipedia.org/wiki/Fresnel_equations#Amplitude_reflection_and_transmission_coefficients. For total internal reflection cases, the formulas need to be modified as the outgoing angle is undefined. This is done in the following PDF document.
Fresnel_reflection_coefficients.pdf
For TIR incident angles, the reflection coefficients have magnitude one and change phase dependent on the incident angle. The previous implementation had a -1 error in the r_p coefficient.
I also changed the code to return 0 for transmission coefficients for TIR cases