NuRadioReco.modules.LOFAR.planeWaveDirectionFitter_LOFAR module

This module has been adapted from pycrtools.modules.tasks.directionfitplanewave and NuRadioReco.modules.LOFAR.beamformingDirectionFitter_LOFAR

NuRadioReco.modules.LOFAR.planeWaveDirectionFitter_LOFAR.average_direction(event, detector, mode='normal')[source]

Calculate the average direction for an event based on the plane wave directions of the individual stations.

Parameters:
eventEvent object

The event for which to calculate the average direction.

detectorDetector object

The detector for which to calculate the average direction.

modestr, default=’normal’

The mode to use for the calculation. Can be ‘normal’ (just raw mean) or ‘weighted’ (with number of good antennas as weight per station).

Returns:
avg_zenithfloat

The average zenith angle for the event.

avg_azimuthfloat

The average azimuth angle for the event.

class NuRadioReco.modules.LOFAR.planeWaveDirectionFitter_LOFAR.planeWaveDirectionFitter[source]

Bases: object

Fits the direction per station using timing differences of channels under the assumption of an incoming plane wave.

Methods

begin([max_iter, cr_snr, min_amp, ...])

Set the parameters for the plane wave fit.

debug_plots(event, expected_delays, ...)

Create debug plots for the plane wave fit.

run(event, detector)

Run the plane wave fit for the given event and detector.

end

begin(max_iter=10, cr_snr=6.5, min_amp=None, rmsfactor=2.0, force_horizontal_array=True, debug=False, logger_level=0, min_number_good_antennas=4)[source]

Set the parameters for the plane wave fit.

Parameters:
max_iterint, default=10

The maximum number of iterations to use during the fitting procedure.

cr_snrfloat, default=3

The minimum SNR a channel should have to be considered having a cosmic ray signal. Ignored if min_amp is not None.

min_ampfloat, default=0.001

The minimum amplitude a channel should have to be considered having a cosmic ray signal. Set to None if you want to use the SNR instead.

rmsfactorfloat, default=2.0

How many sigma (times RMS) above the average can a delay deviate from the expected timelag (from latest fit iteration) before it is considered bad and removed as outlier.

force_horizontal_arraybool, default=True

Set to True when you know the array is non-horizontal (z > 0.5) but want to use the horizontal approximation anyway. Recommended to set to True.

debugbool, default=False

Set to True to enable debug plots.

logger_levelint, default=logging.WARNING

The logging level to use for the module.

min_number_good_antennasint, default=4

The minimum number of good antennas that should be present in a station to consider it for the fit.

run(event, detector)[source]

Run the plane wave fit for the given event and detector.

Parameters:
eventEvent object

The event for which to run the plane wave fit.

detectorDetector object

The detector for which to run the plane wave fit.

static debug_plots(event, expected_delays, good_antennas, niter, position_array, residual_delays, station, times)[source]

Create debug plots for the plane wave fit.

end()[source]