Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

fix sign error in r_p coefficient. #97

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cg-laser
Copy link
Contributor

@cg-laser cg-laser commented Jul 5, 2019

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

@cg-laser
Copy link
Contributor Author

cg-laser commented Jul 6, 2019

Actually this 'fix' is not compatible with our measurement. We measure a direct and reflected pulse. According to the old formula, the phase shift should be ~55deg, which matched exactly our measurement (taking the first direct pulse as template and multiplying it (the FFT) with exp(1j * 55deg). The template labeled with (180deg) is the result for this branch.
ch6_R1_avg_zoom2

So either the old implementation was correct (but I don't remember why I had the -1 difference in there and can't reproduce it at the moment), OR the phase shift needs to be calculated with
exp(-1j * phase) instead of exp(1j * phase) but I wouldn't know why.

@cg-laser
Copy link
Contributor Author

cg-laser commented Jul 6, 2019

ok reading wikipedia more carefully (https://en.wikipedia.org/wiki/Total_internal_reflection#Phase_shifts)
In equations (5), (7), (8), (10), and (11), we advance the phase by the angle ϕ if we replace ωt by ωt+ϕ  (that is, if we replace −ωt by −ωt−ϕ),  with the result that the (complex) field is multiplied by e−iϕ. So a phase advance is equivalent to multiplication by a complex constant with a negative argument. This becomes more obvious when (e.g.) the field (5) is factored as {\displaystyle \mathbf {E_{k}} e^{i\mathbf {k\cdot r} }e^{-i\omega t},\,} {\displaystyle \mathbf {E_{k}} e^{i\mathbf {k\cdot r} }e^{-i\omega t},\,} where the last factor contains the time-dependence
the new equation is correct but we need to multiply with exp(-1j phase). Which corresponds to multiplying with the negative reflection coefficient. And this seems to apply to all coefficients. So the best implementation would be to always return the negativ reflection/transmission coefficient (?) so that E_reflected = E * r and E_transmitted = E * t.

@christophwelling
Copy link
Collaborator

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

@cg-laser
Copy link
Contributor Author

do not merge, the current implementation is not correct

Copy link
Collaborator

@anelles anelles left a 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.

@cg-laser
Copy link
Contributor Author

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

Copy link
Collaborator

@anelles anelles left a 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?

@anelles
Copy link
Collaborator

anelles commented Aug 22, 2019

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.

@cg-laser
Copy link
Contributor Author

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

@anelles
Copy link
Collaborator

anelles commented Aug 20, 2020

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?

@anelles
Copy link
Collaborator

anelles commented Jan 5, 2021

@cg-laser you probably need to make the call on this one ...

@cg-laser
Copy link
Contributor Author

we won't merge this PR but I suggest to leave it open for a future reference on this discussion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants