NuRadioMC.SignalGen.ARZ.ARZ module

NuRadioMC.SignalGen.ARZ.ARZ.get_vector_potential(shower_energy, theta, N, dt, profile_depth, profile_ce, Af, freq_pos, freq_neg, exp_pos, exp_neg, t0_pos, t0_neg, shower_type='HAD', n_index=1.78, distance=1, interp_factor=1.0, interp_factor2=100.0, shift_for_xmax=False, em_factor=1.0)[source]

fast interpolation of time-domain calculation of vector potential of the Askaryan pulse from a charge-excess profile

Note that the returned array has N+1 samples so that the derivative (the efield) will have N samples.

The numerical integration was replaces by a sum using the trapezoid rule using vectorized numpy operations

Parameters:
shower_energy: float

the energy of the shower

theta: float

viewing angle, i.e., the angle between shower axis and launch angle of the signal (the ray path)

N: int

number of samples in the time domain

dt: float

size of one time bin in units of time

profile_depth: array of floats

shower depth values of the charge excess profile

profile_ce: array of floats

charge-excess values of the charge excess profile

shower_type: string (default “HAD”)

type of shower, either “HAD” (hadronic) or “EM” (electromagnetic)

n_index: float (default 1.78)

index of refraction where the shower development takes place

distance: float (default 1km)

observation distance, the signal amplitude will be scaled according to 1/R

interp_factor: int (default 1)

interpolation factor of charge-excess profile. Results in a more precise numerical integration which might be beneficial for small vertex distances but also slows down the calculation proportional to the interpolation factor. if None, the interpolation factor will be calculated from the distance

interp_factor2: int (default 100)

interpolation just around the peak of the form factor

shift_for_xmax: bool (default False)

if True the observer position is placed relative to the position of the shower maximum, if False it is placed with respect to (0,0,0) which is the start of the charge-excess profile. The shower maximum is determined as the position of the maximum of the charge excess profile

Af: float

ARZ model parameter

freq_pos: float

ARZ model parameter

freq_neg: float

ARZ model parameter

exp_pos: float

ARZ model parameter

exp_neg: float

ARZ model parameter

t0_pos: float

ARZ model parameter

t0_neg: float

ARZ model parameter

em_factor: float

Energy fraction of the electromagnetic component of the shower. Used only for hadronic showers.

NuRadioMC.SignalGen.ARZ.ARZ.get_vector_potential_numba(shower_energy, theta, N, dt, profile_depth, profile_ce, Af, freq_pos, freq_neg, exp_pos, exp_neg, t0_pos, t0_neg, shower_type='HAD', n_index=1.78, distance=1, interp_factor=1.0, interp_factor2=100.0, shift_for_xmax=False, em_factor=1.0)

fast interpolation of time-domain calculation of vector potential of the Askaryan pulse from a charge-excess profile

Note that the returned array has N+1 samples so that the derivative (the efield) will have N samples.

The numerical integration was replaces by a sum using the trapezoid rule using vectorized numpy operations

Parameters:
shower_energy: float

the energy of the shower

theta: float

viewing angle, i.e., the angle between shower axis and launch angle of the signal (the ray path)

N: int

number of samples in the time domain

dt: float

size of one time bin in units of time

profile_depth: array of floats

shower depth values of the charge excess profile

profile_ce: array of floats

charge-excess values of the charge excess profile

shower_type: string (default “HAD”)

type of shower, either “HAD” (hadronic) or “EM” (electromagnetic)

n_index: float (default 1.78)

index of refraction where the shower development takes place

distance: float (default 1km)

observation distance, the signal amplitude will be scaled according to 1/R

interp_factor: int (default 1)

interpolation factor of charge-excess profile. Results in a more precise numerical integration which might be beneficial for small vertex distances but also slows down the calculation proportional to the interpolation factor. if None, the interpolation factor will be calculated from the distance

interp_factor2: int (default 100)

interpolation just around the peak of the form factor

shift_for_xmax: bool (default False)

if True the observer position is placed relative to the position of the shower maximum, if False it is placed with respect to (0,0,0) which is the start of the charge-excess profile. The shower maximum is determined as the position of the maximum of the charge excess profile

Af: float

ARZ model parameter

freq_pos: float

ARZ model parameter

freq_neg: float

ARZ model parameter

exp_pos: float

ARZ model parameter

exp_neg: float

ARZ model parameter

t0_pos: float

ARZ model parameter

t0_neg: float

ARZ model parameter

em_factor: float

Energy fraction of the electromagnetic component of the shower. Used only for hadronic showers.

NuRadioMC.SignalGen.ARZ.ARZ.thetaprime_to_theta(thetaprime, xmax, R_prime)[source]

converts a viewing angle relative to the shower maximum to a viewing angle relative to the start of the shower.

Parameters:
thetaprime: float

Angle formed between the shower axis and the shower maximum-observer line

xmax: float

The shower maximum depth in amount of matter traversed

R_prime: float

The distance between shower maximum and observer

NuRadioMC.SignalGen.ARZ.ARZ.theta_to_thetaprime(theta, xmax, R)[source]

converts a viewing angle relative to the start of the shower to a viewing angle relative to the shower maximum

Parameters:
theta: float

The angle between the shower axis and the vertex-observer line

xmax: float

The shower maximum depth in amount of matter traversed

R: float

The distance between shower vertex and observer

class NuRadioMC.SignalGen.ARZ.ARZ.ARZ(*args, **kwargs)[source]

Bases: object

Methods

em_fraction(energy)

Returns the energy fraction carried by the electromagnetic component of a hadronic shower

get_last_shower_profile_id()

returns dict

get_shower_profile(shower_energy, ...)

Gets a charge-excess profile

get_time_trace(shower_energy, theta, N, dt, ...)

calculates the electric-field Askaryan pulse from a charge-excess profile

get_vector_potential(energy, theta, N, dt[, ...])

python transcription of original FORTRAN code (slow, DO NOT USE)

get_vector_potential_fast(shower_energy, ...)

--- This function is deprecated and has been replaced by the module level ARZ.get_vector_potential() ---

set_interpolation_factor(interp_factor)

set interpolation factor of charge-excess profiles

set_interpolation_factor2(interp_factor)

set interpolation factor around peak of form factor

set_seed(seed)

allow to set a new random seed

em_fraction(energy)[source]

Returns the energy fraction carried by the electromagnetic component of a hadronic shower

set_seed(seed)[source]

allow to set a new random seed

set_interpolation_factor(interp_factor)[source]

set interpolation factor of charge-excess profiles

set_interpolation_factor2(interp_factor)[source]

set interpolation factor around peak of form factor

get_shower_profile(shower_energy, shower_type, iN)[source]

Gets a charge-excess profile

Parameters:
shower_energy: float

the energy of the shower

shower_type: string (default “HAD”)

type of shower, either “HAD” (hadronic) or “EM” (electromagnetic)

iN: int

specify shower number

Returns:
depth, excess: two arrays of floats

slant depths and charge profile amplitudes

get_time_trace(shower_energy, theta, N, dt, shower_type, n_index, R, shift_for_xmax=False, same_shower=False, iN=None, output_mode='trace', maximum_angle=0.3490658503988659)[source]

calculates the electric-field Askaryan pulse from a charge-excess profile

Parameters:
shower_energy: float

the energy of the shower

theta: float

viewing angle, i.e., the angle between shower axis and launch angle of the signal (the ray path)

N: int

number of samples in the time domain

dt: float

size of one time bin in units of time

shower_type: string (default “HAD”)

type of shower, either “HAD” (hadronic) or “EM” (electromagnetic)

n_index: float (default 1.78)

index of refraction where the shower development takes place

R: float (default 1km)

observation distance, the signal amplitude will be scaled according to 1/R

interp_factor: int (default 10)

interpolation factor of charge-excess profile. Results in a more precise numerical integration which might be beneficial for small vertex distances but also slows down the calculation proportional to the interpolation factor.

shift_for_xmax: bool (default False)

if True the observer position is placed relative to the position of the shower maximum, if False it is placed with respect to (0,0,0) which is the start of the charge-excess profile. The shower maximum is determined as the position of the maximum of the charge excess profile

same_shower: bool (default False)

if False, for each request a new random shower realization is choosen. if True, the shower from the last request of the same shower type is used. This is needed to get the Askaryan signal for both ray tracing solutions from the same shower.

iN: int or None (default None)

specify shower number

output_mode: string
  • ‘trace’ (default): return only the electric field trace

  • ‘Xmax’: return trace and position of xmax in units of length

  • ‘full’ return trace, depth and charge_excess profile

maximum_angle: float

Maximum angular difference allowed between the observer angle and the Cherenkov angle. If the difference is greater, the function returns an empty trace.

Returns:
efield_trace: array of floats

array of electric-field time trace in ‘on-sky’ coordinate system eR, eTheta, ePhi

get_last_shower_profile_id()[source]
returns dict

the index of the randomly selected shower profile per shower type key is the shower type (string) value is the index (int)

get_vector_potential_fast(shower_energy, theta, N, dt, profile_depth, profile_ce, shower_type='HAD', n_index=1.78, distance=1, interp_factor=1.0, interp_factor2=100.0, shift_for_xmax=False)[source]

— This function is deprecated and has been replaced by the module level ARZ.get_vector_potential() —

fast interpolation of time-domain calculation of vector potential of the Askaryan pulse from a charge-excess profile

Note that the returned array has N+1 samples so that the derivative (the efield) will have N samples.

The numerical integration was replaces by a sum using the trapeoiz rule using vectorized numpy operations

Parameters:
shower_energy: float

the energy of the shower

theta: float

viewing angle, i.e., the angle between shower axis and launch angle of the signal (the ray path)

N: int

number of samples in the time domain

dt: float

size of one time bin in units of time

profile_depth: array of floats

shower depth values of the charge excess profile

profile_ce: array of floats

charge-excess values of the charge excess profile

shower_type: string (default “HAD”)

type of shower, either “HAD” (hadronic) or “EM” (electromagnetic)

n_index: float (default 1.78)

index of refraction where the shower development takes place

distance: float (default 1km)

observation distance, the signal amplitude will be scaled according to 1/R

interp_factor: int (default 1)

interpolation factor of charge-excess profile. Results in a more precise numerical integration which might be beneficial for small vertex distances but also slows down the calculation proportional to the interpolation factor. if None, the interpolation factor will be calculated from the distance

interp_factor2: int (default 100)

interpolation just around the peak of the form factor

shift_for_xmax: bool (default False)

if True the observer position is placed relative to the position of the shower maximum, if False it is placed with respect to (0,0,0) which is the start of the charge-excess profile. The shower maximum is determined as the position of the maximum of the charge excess profile

get_vector_potential(energy, theta, N, dt, y=1, ccnc='cc', flavor=12, n_index=1.78, R=1, profile_depth=None, profile_ce=None)[source]

python transcription of original FORTRAN code (slow, DO NOT USE)

class NuRadioMC.SignalGen.ARZ.ARZ.ARZ_tabulated(seed=1234, library=None)[source]

Bases: object

Methods

get_time_trace(shower_energy, theta, N, dt, ...)

calculates the electric-field Askaryan pulse from a charge-excess profile

set_seed(seed)

allow to set a new random seed

set_seed(seed)[source]

allow to set a new random seed

get_time_trace(shower_energy, theta, N, dt, shower_type, n_index, R, same_shower=False, iN=None, output_mode='trace', theta_reference='X0')[source]

calculates the electric-field Askaryan pulse from a charge-excess profile

Parameters:
shower_energy: float

the energy of the shower

theta: float

viewing angle, i.e., the angle between shower axis and launch angle of the signal (the ray path)

N: int

number of samples in the time domain

dt: float

size of one time bin in units of time

shower_type: string (default “HAD”)

type of shower, either “HAD” (hadronic) or “EM” (electromagnetic)

n_index: float (default 1.78)

index of refraction where the shower development takes place

R: float (default 1km)

observation distance, the signal amplitude will be scaled according to 1/R

same_shower: bool (default False)

if False, for each request a new random shower realization is choosen. if True, the shower from the last request of the same shower type is used. This is needed to get the Askaryan signal for both ray tracing solutions from the same shower.

iN: int or None (default None)

specify shower number

output_mode: string
  • ‘trace’ (default): return only the electric field trace

  • ‘Xmax’: return trace and position of xmax in units of length

theta_reference: string (default: X0)
  • ‘X0’: viewing angle relativ to start of the shower

  • ‘Xmax’: viewing angle is relativ to Xmax, internally it will be converted to be relative to X0

Returns:
efield_trace: array of floats

array of electric-field time trace in ‘on-sky’ coordinate system eR, eTheta, ePhi