NuRadioReco.modules.efieldRadioInterferometricReconstruction module

NuRadioReco.modules.efieldRadioInterferometricReconstruction.logger = <Logger efieldRadioInterferometricReconstruction (WARNING)>
This module hosts to classes
  • efieldInterferometricDepthReco

  • efieldInterferometricAxisReco (TODO: Not yet implemented)

The radio-interferometric reconstruction (RIT) was proposed in [1]. The implementation here is based on work published in [2].

[1]: H. Schoorlemmer, W. R. Carvalho Jr., arXiv:2006.10348 [2]: F. Schlueter, T. Huege, doi:10.1088/1748-0221/16/07/P07048

class NuRadioReco.modules.efieldRadioInterferometricReconstruction.efieldInterferometricDepthReco[source]

Bases: object

This class reconstructs the depth of the maximum of the longitudinal profile of the beam-formed radio emission: X_RIT along a given axis. X_RIT is found to correlate with X_max. This correlation may depend on the zenith angle, the frequency band, and detector layout (if the detector is very irregular).

For the reconstruction, a shower axis is needed. The radio emission in the vxB polarisation is used (and thus the arrival direction is needed).

Methods

begin([interpolation, signal_kind, debug])

Set module config.

end()

Plot reconstructed depth vs true depth of shower maximum (Xmax).

reconstruct_interferometric_depth(traces, ...)

Returns Gauss-parameters fitted to the "peak" of the interferometic longitudinal profile along the shower axis.

run(evt, det[, use_MC_geometry, use_MC_pulses])

Run interferometric reconstruction of depth of coherent signal.

sample_longitudinal_profile(traces, times, ...)

Returns the longitudinal profile of the interferometic signal sampled along the shower axis.

update_atmospheric_model_and_refractivity_table(shower)

Updates model of the atmosphere and tabulated, integrated refractive index according to shower properties.

begin(interpolation=True, signal_kind='power', debug=False)[source]

Set module config.

Parameters:
interpolationbool

If true, use a linear interpolation to match sampling of the beamformed signal trace and the individual time-shifted antenna traces. Default is True, False is not yet implemented

signal_kindstr

Define which signal “metric” is used on the beamformed traces. Default “power” : sum over the squared amplitudes in a 100 ns window around the peak. Other options are “amplitude” or “hilbert_sum”

debugbool

If true, show some debug plots (Default: False).

sample_longitudinal_profile(traces, times, station_positions, shower_axis, core, depths=None, distances=None)[source]

Returns the longitudinal profile of the interferometic signal sampled along the shower axis.

Parameters:
tracesarray(number_of_antennas, samples)

Electric field traces (one polarisation of it, usually vxB) for all antennas/stations.

timesarray(number_of_antennas, samples)

Time vectors corresponding to the electric field traces.

station_positionsarray(number_of_antennas, 3)

Position of each antenna.

shower_axisarray(3,)

Axis/direction along which the interferometric signal is sampled. Anchor is “core”.

corearray(3,)

Shower core. Keep in mind that the altitudes (z-coordinate) matters.

depthsarray (optinal)

Define the positions (slant depth along the axis) at which the interferometric signal is sampled. Instead of “depths” you can provide “distances”.

distancesarray (optinal)

Define the positions (geometrical distance from core along the axis) at which the interferometric signal is sampled. Instead of “distances” you can provide “depths”.

Returns:
signalsarray

Interferometric singals sampled along the given axis

reconstruct_interferometric_depth(traces, times, station_positions, shower_axis, core, lower_depth=400, upper_depth=800, bin_size=100, return_profile=False)[source]

Returns Gauss-parameters fitted to the “peak” of the interferometic longitudinal profile along the shower axis.

A initial samping range and size in defined by “lower_depth”, “upper_depth”, “bin_size”. However if the “peak”, i.e., maximum signal is found at an edge the sampling range in continually increased (with a min/max depth of 0/2000 g/cm^2). The Gauss is fitted around the found peak with a refined sampling (use 20 samples in this narrow range).

Parameters:
tracesarray(number_of_antennas, samples)

Electric field traces (one polarisation of it, usually vxB) for all antennas/stations.

timesarray(number_of_antennas, samples)

Time vectors corresponding to the electric field traces.

station_positionsarray(number_of_antennas, 3)

Position of each antenna.

shower_axisarray(3,)

Axis/direction along which the interferometric signal is sampled. Anchor is “core”.

corearray(3,)

Shower core. Keep in mind that the altitudes (z-coordinate) matters.

lower_depthfloat

Define the lower edge for the inital sampling (default: 400 g/cm2).

upper_depthfloat

Define the upper edge for the inital sampling (default: 800 g/cm2).

bin_sizefloat

Define the step size pf the inital sampling (default: 100 g/cm2). The refined sampling around the peak region is / 10 this value.

return_profilebool

If true return the sampled profile in addition to the Gauss parameter (default: False).

Returns:
If return_profile is True
depths_corsenp.array

Depths along shower axis coarsely sampled

depths_finenp.array

Depths along shower axis finely sampled (used in fitting)

signals_coresenp.array

Beamformed signals along shower axis coarsely sampled

signals_finenp.array

Beamformed signals along shower axis finely sampled (used in fitting)

poptlist

List of fitted Gauss parameters (amplitude, position, width)

If return_profile is False:
poptlist

List of fitted Gauss parameters (amplitude, position, width)

update_atmospheric_model_and_refractivity_table(shower)[source]

Updates model of the atmosphere and tabulated, integrated refractive index according to shower properties.

Parameters:
showerBaseShower
run(evt, det, use_MC_geometry=True, use_MC_pulses=True)[source]

Run interferometric reconstruction of depth of coherent signal.

Parameters:
evtEvent

Event to run the module on.

detDetector

Detector description

use_MC_geometrybool

if true, take geometry from sim_shower. Results will than also be stored in sim_shower

use_MC_pulsesbool

if true, take electric field trace from sim_station

end()[source]

Plot reconstructed depth vs true depth of shower maximum (Xmax).

class NuRadioReco.modules.efieldRadioInterferometricReconstruction.efieldInterferometricAxisReco[source]

Bases: efieldInterferometricDepthReco

Class to reconstruct the shower axis with beamforming.

Methods

begin([interpolation, signal_kind, debug])

Set module config.

end()

Plot reconstructed depth vs true depth of shower maximum (Xmax).

find_maximum_in_plane(xs, ys, p_axis, ...)

Sample interferometric signals in 2-d plane (vxB-vxvxB) perpendicular to a given axis on a rectangular/quadratic grid.

reconstruct_interferometric_depth(traces, ...)

Returns Gauss-parameters fitted to the "peak" of the interferometic longitudinal profile along the shower axis.

reconstruct_shower_axis(traces, times, ...)

Run interferometric reconstruction of the shower axis.

run(evt, det[, use_MC_geometry, use_MC_pulses])

Run interferometric reconstruction of depth of coherent signal.

sample_lateral_cross_section(traces, times, ...)

Sampling the "cross section", i.e., 2d-lateral distribution of the beam formed signal for a slice in the atmosphere.

sample_longitudinal_profile(traces, times, ...)

Returns the longitudinal profile of the interferometic signal sampled along the shower axis.

update_atmospheric_model_and_refractivity_table(shower)

Updates model of the atmosphere and tabulated, integrated refractive index according to shower properties.

find_maximum_in_plane(xs, ys, p_axis, station_positions, traces, times, cs)[source]

Sample interferometric signals in 2-d plane (vxB-vxvxB) perpendicular to a given axis on a rectangular/quadratic grid. The orientation of the plane is defined by the radiotools.coordinatesytem.cstrafo argument.

Parameters:
xsarray

x-coordinates defining the sampling positions.

ysarray

y-coordinates defining the sampling positions.

p_axisarray(3,)

Origin of the 2-d plane along the axis.

station_positionsarray(number_of_antennas, 3)

Position of each antenna.

tracesarray(number_of_antennas, samples)

Electric field traces (one polarisation of it, usually vxB) for all antennas/stations.

timesarray(number_of_antennas, samples)

Time vectors corresponding to the electric field traces.

csradiotools.coordinatesytem.cstrafo
Returns:
idxint

Index of the entry with the largest signal (np.argmax(signals))

signalsarray(len(xs), len(ys))

Interferometric signal

sample_lateral_cross_section(traces, times, station_positions, shower_axis_inital, core, depth, cs, shower_axis_mc, core_mc, relative=False, initial_grid_spacing=60, centered_around_truth=True, cross_section_size=1000, deg_resolution=8.726646259971648e-05)[source]

Sampling the “cross section”, i.e., 2d-lateral distribution of the beam formed signal for a slice in the atmosphere. It is looking for the maximum in the lateral distribution with an (stupid) iterative grid search.

Returns the position and the strenght of the maximum signal.

Parameters:
tracesarray(number_of_antennas, samples)

Electric field traces (one polarisation of it, usually vxB) for all antennas/stations.

timesarray(number_of_antennas, samples)

Time vectors corresponding to the electric field traces.

station_positionsarray(number_of_antennas, 3)

Position of each antenna.

shower_axis_initalarray(3,)

Axis/direction which is used as initial guess for the true shower axis. Around this axis the interferometric signals are sample on 2-d planes.

corearray(3,)

Shower core which is used as initial guess. Keep in mind that the altitudes (z-coordinate) matters.

depthnp.array
csradiotools.coordinatesytem.cstrafo
shower_axis_mcnp.array(3,)
core_mcnp.array(3,)
relativebool (Default: False)

If True, the size of the search grid is relative to the distance between the MC axis and the inital guess axis. The search grid will by a 20 x 20 and just include the MC axis. It is made sure that the MC axis is not at a grid point. If False, see centered_around_truth.

initial_grid_spacingdouble

Initial spacing of your grid points in meters. (Default: 60m)

centered_around_truthbool (Default: True)

Only used when relative == False. If True, the search grid will be constructed around the MC axis. The size and spacing between grid points is determined by cross_section_size and initial_grid_spacing. If False, the search grid is constructed around the inital guess axis. It ensured that the MC-axis is within the search grid. that means the grid size might be abitrary large (which makes the reconstruction very slow) if the inital axis is far off the MC axis.

cross_section_sizefloat

(Only used when centered_around_truth == True.) Side length on the 2-d planes (slice) along which the maximum around the initial axis is sampled in meters. (Default: 1000m)

deg_resolutionfloat

Target spacing for the grid spacing in terms of opening angle. Unit is radiants. Defines the stopping condition for the iterations. (Default: np.deg2rad(0.005))

Returns:
point_foundnp.array(3,)

Position of the found maximum

weightfloat

Amplitude/Strengt of the maximum

reconstruct_shower_axis(traces, times, station_positions, shower_axis, core, magnetic_field_vector, is_mc=True, initial_grid_spacing=60, cross_section_size=1000)[source]

Run interferometric reconstruction of the shower axis. Find the maxima of the interferometric signals within 2-d plane (slices) along a given axis (initial guess). Through those maxima (their position in the atmosphere) a straight line is fitted to reconstruct the shower axis.

tracesarray(number_of_antennas, samples)

Electric field traces (one polarisation of it, usually vxB) for all antennas/stations.

timesarray(number_of_antennas, samples)

Time vectors corresponding to the electric field traces.

station_positionsarray(number_of_antennas, 3)

Position of each antenna.

shower_axis_initalarray(3,)

Axis/direction which is used as initial guess for the true shower axis. Around this axis the interferometric signals are sample on 2-d planes.

corearray(3,)

Shower core which is used as initial guess. Keep in mind that the altitudes (z-coordinate) matters.

magnetic_field_vectorarray(3,)

Magnetic field vector of the site you are using.

is_mcbool

If true, interprete the provided shower axis as truth and add some gaussian smearing to optain an inperfect initial guess for the shower axis (Default: True).

initial_grid_spacingdouble

Spacing of your grid points in meters (Default: 60m)

cross_section_sizedouble

Side length on the 2-d planes (slice) along which the maximum around the initial axis is sampled in meters (Default: 1000m).

run(evt, det, use_MC_geometry=True, use_MC_pulses=True)[source]

Run interferometric reconstruction of depth of coherent signal.

Parameters:
evtEvent

Event to run the module on.

detDetector

Detector description

use_MC_geometrybool

if true, take geometry from sim_shower. Results will than also be stored in sim_shower

use_MC_pulsesbool

if true, take electric field trace from sim_station

end()[source]

Plot reconstructed depth vs true depth of shower maximum (Xmax).

begin(interpolation=True, signal_kind='power', debug=False)

Set module config.

Parameters:
interpolationbool

If true, use a linear interpolation to match sampling of the beamformed signal trace and the individual time-shifted antenna traces. Default is True, False is not yet implemented

signal_kindstr

Define which signal “metric” is used on the beamformed traces. Default “power” : sum over the squared amplitudes in a 100 ns window around the peak. Other options are “amplitude” or “hilbert_sum”

debugbool

If true, show some debug plots (Default: False).

reconstruct_interferometric_depth(traces, times, station_positions, shower_axis, core, lower_depth=400, upper_depth=800, bin_size=100, return_profile=False)

Returns Gauss-parameters fitted to the “peak” of the interferometic longitudinal profile along the shower axis.

A initial samping range and size in defined by “lower_depth”, “upper_depth”, “bin_size”. However if the “peak”, i.e., maximum signal is found at an edge the sampling range in continually increased (with a min/max depth of 0/2000 g/cm^2). The Gauss is fitted around the found peak with a refined sampling (use 20 samples in this narrow range).

Parameters:
tracesarray(number_of_antennas, samples)

Electric field traces (one polarisation of it, usually vxB) for all antennas/stations.

timesarray(number_of_antennas, samples)

Time vectors corresponding to the electric field traces.

station_positionsarray(number_of_antennas, 3)

Position of each antenna.

shower_axisarray(3,)

Axis/direction along which the interferometric signal is sampled. Anchor is “core”.

corearray(3,)

Shower core. Keep in mind that the altitudes (z-coordinate) matters.

lower_depthfloat

Define the lower edge for the inital sampling (default: 400 g/cm2).

upper_depthfloat

Define the upper edge for the inital sampling (default: 800 g/cm2).

bin_sizefloat

Define the step size pf the inital sampling (default: 100 g/cm2). The refined sampling around the peak region is / 10 this value.

return_profilebool

If true return the sampled profile in addition to the Gauss parameter (default: False).

Returns:
If return_profile is True
depths_corsenp.array

Depths along shower axis coarsely sampled

depths_finenp.array

Depths along shower axis finely sampled (used in fitting)

signals_coresenp.array

Beamformed signals along shower axis coarsely sampled

signals_finenp.array

Beamformed signals along shower axis finely sampled (used in fitting)

poptlist

List of fitted Gauss parameters (amplitude, position, width)

If return_profile is False:
poptlist

List of fitted Gauss parameters (amplitude, position, width)

sample_longitudinal_profile(traces, times, station_positions, shower_axis, core, depths=None, distances=None)

Returns the longitudinal profile of the interferometic signal sampled along the shower axis.

Parameters:
tracesarray(number_of_antennas, samples)

Electric field traces (one polarisation of it, usually vxB) for all antennas/stations.

timesarray(number_of_antennas, samples)

Time vectors corresponding to the electric field traces.

station_positionsarray(number_of_antennas, 3)

Position of each antenna.

shower_axisarray(3,)

Axis/direction along which the interferometric signal is sampled. Anchor is “core”.

corearray(3,)

Shower core. Keep in mind that the altitudes (z-coordinate) matters.

depthsarray (optinal)

Define the positions (slant depth along the axis) at which the interferometric signal is sampled. Instead of “depths” you can provide “distances”.

distancesarray (optinal)

Define the positions (geometrical distance from core along the axis) at which the interferometric signal is sampled. Instead of “distances” you can provide “depths”.

Returns:
signalsarray

Interferometric singals sampled along the given axis

update_atmospheric_model_and_refractivity_table(shower)

Updates model of the atmosphere and tabulated, integrated refractive index according to shower properties.

Parameters:
showerBaseShower
NuRadioReco.modules.efieldRadioInterferometricReconstruction.get_geometry_and_transformation(shower)[source]

Returns core (def. as intersection between shower axis and observation plane, shower axis, and radiotools.coordinatesytem for given shower.

Parameters:
showerBaseShower
NuRadioReco.modules.efieldRadioInterferometricReconstruction.get_station_data(evt, det, cs, use_MC_pulses, n_sampling=None)[source]

Returns station data in a proper format

Parameters:
evtEvent
detDetector
csradiotools.coordinatesystems.cstrafo
use_MC_pulsesbool

if true take electric field trace from sim_station

n_samplingint

if not None clip trace with n_sampling // 2 around np.argmax(np.abs(trace))

Returns:
traces_vxBnp.array

The electric field traces in the vxB polarisation (takes first electric field stored in a station) for all stations/observers.

timesmp.array

The electric field traces time series for all stations/observers.

posnp.array

Positions for all stations/observers.

NuRadioReco.modules.efieldRadioInterferometricReconstruction.plot_lateral_cross_section(xs, ys, signals, mc_pos=None, fname=None, title=None)[source]

Plot the lateral distribution of the beamformed singal (in the vxB, vxvxB directions).

Parameters:
xsnp.array

Positions on x-axis (vxB) at which the signal is sampled (on a 2d grid)

ysnp.array

Positions on y-axis (vxvxB) at which the signal is sampled (on a 2d grid)

signalsnp.array

Signals sampled on the 2d grid defined by xs and ys.

mc_posnp.array(2,)

Intersection of the (MC-)axis with the “slice” of the lateral distribution plotted.

fnamestr

Name of the figure. If given the figure is saved, if fname is None the fiture is shown.

titlestr

Title of the figure (Default: None)