scottprahl / pypolar

Python modules for polarization changes using Jones or Mueller calculus
MIT License
37 stars 9 forks source link

t_per_amplitude not calculated properly #4

Open KrystofJasensky opened 4 weeks ago

KrystofJasensky commented 4 weeks ago

Hello. I was using the Fresnel module of pypolar for calculation of Fresnel amplitude transmission coefficients for GaAs and I got results which seem to be wrong. I do not know whether I made a mistake somewhere but it seems that the coefficient calculated by t_per_amplitude is not correct. I am adding the Python/Jupyter code that I was using, where the coefficients are also calculated directly without pypolar

Code_which_produces_incorrect_results.txt

scottprahl commented 3 weeks ago

why do you think the fresnel module is correct?

Perhaps the two sets of code use different conventions for the imaginary component?

KrystofJasensky commented 3 weeks ago

Maybe I do not understand your first question. I thought the fresnel module would be working correctly because there is no warning on the documentation page. And the second question - I tried inputting the refractive index with both signs for the imaginary part and the output is still pretty much the same. I am uploading the calculated real and imaginary parts of transmission coefficients (by the fresnel pypolar module) in a graph below and the real part of $t_{\perp}$ (or $t_s$) does not go to zero as it should for 90°

image