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
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion NuRadioReco/utilities/geometryUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ def get_fresnel_t_p(zenith_incoming, n_2=1.3, n_1=1.):
of the incoming radiation."
"""
zenith_outgoing = get_fresnel_angle(zenith_incoming, n_2, n_1)
if(zenith_outgoing is None):
return 0
t = 2 * n_1 * np.cos(zenith_incoming) / (n_1 * np.cos(zenith_outgoing) + n_2 * np.cos(zenith_incoming))
return t

Expand All @@ -124,6 +126,8 @@ def get_fresnel_t_s(zenith_incoming, n_2=1.3, n_1=1.):
of the incoming radiation."
"""
zenith_outgoing = get_fresnel_angle(zenith_incoming, n_2, n_1)
if(zenith_outgoing is None):
return 0
t = 2 * n_1 * np.cos(zenith_incoming) / (n_1 * np.cos(zenith_incoming) + n_2 * np.cos(zenith_outgoing))
return t

Expand All @@ -137,10 +141,18 @@ def get_fresnel_r_p(zenith_incoming, n_2=1.3, n_1=1.):
to the 'plane of incident' which is defindes as: "the plane of incidence
is the plane which contains the surface normal and the propagation vector
of the incoming radiation."

see https://github.com/nu-radio/NuRadioReco/pull/97 for a derivation of the equation
"""
n = n_2/n_1
return (-n**2 * np.cos(zenith_incoming) + SM.sqrt(n**2 - np.sin(zenith_incoming)**2)) / \
return (n**2 * np.cos(zenith_incoming) - SM.sqrt(n**2 - np.sin(zenith_incoming)**2)) / \
(n**2 * np.cos(zenith_incoming) + SM.sqrt(n**2 - np.sin(zenith_incoming)**2))


def get_fresnel_r_p2(zenith_incoming, n_2=1.3, n_1=1.):
n = n_1/n_2
return (np.cos(zenith_incoming) - 1j * n *(n**2 * np.sin(zenith_incoming) - 1) ** 0.5) / \
(np.cos(zenith_incoming) + 1j * n *(n**2 * np.sin(zenith_incoming) - 1) ** 0.5)


def get_fresnel_r_s(zenith_incoming, n_2=1.3, n_1=1.):
Expand All @@ -152,6 +164,8 @@ def get_fresnel_r_s(zenith_incoming, n_2=1.3, n_1=1.):
to the 'plane of incident' which is defindes as: "the plane of incidence
is the plane which contains the surface normal and the propagation vector
of the incoming radiation."

see https://github.com/nu-radio/NuRadioReco/pull/97 for a derivation of the equation
"""
n = n_2/n_1
return (np.cos(zenith_incoming) - SM.sqrt(n**2 - np.sin(zenith_incoming)**2)) / \
Expand Down