NuRadioReco.utilities.geometryUtilities module

This module contains utility functions for geometry calculations.

Inparticular to calculate time delays between positions for a given arrival direction and to simulate reflection and refraction at boundaries between different media.

NuRadioReco.utilities.geometryUtilities.get_time_delay_from_direction(zenith, azimuth, positions, n=1.000293)[source]

Calculate the time delay between given positions for an arrival direction

Parameters:
zenith: float [rad]

Zenith angle in convention up = 0

azimuth: float [rad]

Azimuth angle in convention East = 0, counter-clock-wise

positions: array[N x 3]

Positions on ground

n: float (default: 1.000293)

Index of reflection of propagation medium. By default, air is assumed

Returns:
times: np.array of floats

Time delays

NuRadioReco.utilities.geometryUtilities.rot_z(angle)[source]

Angle helper function

NuRadioReco.utilities.geometryUtilities.rot_x(angle)[source]

Angle helper function

NuRadioReco.utilities.geometryUtilities.rot_y(angle)[source]

Angle helper function

NuRadioReco.utilities.geometryUtilities.get_efield_in_spherical_coords(efield, theta, phi)[source]

Get 3D electric field from cartesian coordinates in spherical coordinates, using the arrival directions theta and phi

Parameters:
efield: np.array

Electric field in cartesian coordinates

theta: float

Zenith angle of the arriving signal

phi: float

Azimuth angle of the arriving signal

Returns:
np.array

Electric field in spherical coordinates

NuRadioReco.utilities.geometryUtilities.get_fresnel_angle(zenith_incoming, n_2=1.3, n_1=1.0)[source]

Apply Snell’s law for given zenith angle, when a signal travels from n1 to n2

Parameters:
zenith_incoming: float

Zenith angle of the incoming signal

n_2: float

Refractive index of the medium the signal is transmitted into

n_1: float

Refractive index of the medium the signal is coming from

Returns:
float

Fresnel angle

NuRadioReco.utilities.geometryUtilities.get_fresnel_t_p(zenith_incoming, n_2=1.3, n_1=1.0)[source]

returns the coefficient t which is the ratio of the transmitted wave’s electric field amplitude to that of the incident wave for parallel polarization (p-wave) this polarization corresponds to the eTheta polarization

parallel and perpendicular refers to the signal’s polarization with respect to the ‘plane of incident’ which is defined as: “the plane of incidence is the plane which contains the surface normal and the propagation vector of the incoming radiation.”

Parameters:
zenith_incoming: float

Zenith angle of the incoming signal

n_2: float

Refractive index of the medium the signal is transmitted into

n_1: float

Refractive index of the medium the signal is coming from

Returns:
float

Fresnel coefficient t for theta (parallel) polarization

NuRadioReco.utilities.geometryUtilities.get_fresnel_t_s(zenith_incoming, n_2=1.3, n_1=1.0)[source]

returns the coefficient t which is the ratio of the transmitted wave’s electric field amplitude to that of the incident wave for perpendicular polarization (s-wave) this polarization corresponds to the ePhi polarization

parallel and perpendicular refers to the signal’s polarization with respect to the ‘plane of incident’ which is defined as: “the plane of incidence is the plane which contains the surface normal and the propagation vector of the incoming radiation.”

Parameters:
zenith_incoming: float

Zenith angle of the incoming signal

n_2: float

Refractive index of the medium the signal is transmitted into

n_1: float

Refractive index of the medium the signal is coming from

Returns:
float

Fresnel coefficient t for phi (perpendicular) polarization

NuRadioReco.utilities.geometryUtilities.get_fresnel_r_p(zenith_incoming, n_2=1.3, n_1=1.0)[source]

returns the coefficient r which is the ratio of the reflected wave’s electric field amplitude to that of the incident wave for parallel polarization (p-wave) this polarization corresponds to the eTheta polarization

parallel and perpendicular refers to the signal’s polarization with respect to the ‘plane of incident’ which is defined as: “the plane of incidence is the plane which contains the surface normal and the propagation vector of the incoming radiation.”

Parameters:
zenith_incoming: float

Zenith angle of the incoming signal

n_2: float

Refractive index of the medium the signal is reflected from

n_1: float

Refractive index of the medium the signal is coming from

Returns:
float

Fresnel coefficient r for theta (parallel) polarization

NuRadioReco.utilities.geometryUtilities.get_fresnel_r_s(zenith_incoming, n_2=1.3, n_1=1.0)[source]

returns the coefficient r which is the ratio of the reflected wave’s electric field amplitude to that of the incident wave for perpendicular polarization (s-wave) this polarization corresponds to the ePhi polarization

parallel and perpendicular refers to the signal’s polarization with respect to the ‘plane of incident’ which is defined as: “the plane of incidence is the plane which contains the surface normal and the propagation vector of the incoming radiation.”

Parameters:
zenith_incoming: float

Zenith angle of the incoming signal

n_2: float

Refractive index of the medium the signal is reflected from

n_1: float

Refractive index of the medium the signal is coming from

Returns:
float

Fresnel coefficient r for phi (perpendicular) polarization

NuRadioReco.utilities.geometryUtilities.fresnel_factors_and_signal_zenith(detector, station, channel_id, zenith)[source]

Handles potential refraction into the firn if necessary. Returns the zenith angle at the antenna and the fresnel coefficients t for theta (parallel) and phi (perpendicular) polarization.

This function considers the following three cases:

  • A refraction into the firm is simulated if the signal is coming from above, the antenna is below the surface (= has a negative z-coordinate), and station.is_cosmic_ray() is True.

  • A refraction from firm to air is simulated when the signal is coming from below and the antenna is above the surface.

  • No refraction is simulated if non of the aferomentioned conditions apply.

Warning

For deeper channels this function might be inacccurate. Consider using raytracing. This function uses the flag station.is_cosmic_ray() instead of checking whether the electric field is at the position of the antenna.

Parallel and perpendicular refers to the signal’s polarization with respect to the ‘plane of incident’ which is defined as: “the plane of incidence is the plane which contains the surface normal and the propagation vector of the incoming radiation”.

Parameters:
detector: NuRadioReco.detector.Detector

Detector object

station: NuRadioReco.detector.Station

Station object

channel_id: int

Channel ID of the desired channel

zenith: float

Zenith angle of the incoming signal

Returns:
zenith_antenna: float

Zenith angle at the antenna (potentially including refraction)

t_theta: float

Fresnel transmission coefficient for theta polarization

t_phi: float

Fresnel transmission coefficient for phi polarization