NuRadioReco.modules.LOFAR.stationPulseFinder module
- NuRadioReco.modules.LOFAR.stationPulseFinder.find_snr_of_timeseries(timeseries, sampling_rate=None, window_start=0, window_end=-1, noise_start=0, noise_end=-1, resample_factor=1, full_output=False)[source]
Return the signal-to-noise ratio (SNR) of a given time trace, defined as
- ..math ::
frac{max( | Hilbert(timeseries[window]) | )}{ STD( Hilbert(timeseries[noise]) ) }
The signal window and noise window are controlled through the extra parameters to the function.
- Parameters:
- timeseries: array-like
The time trace
- sampling_ratefloat
The sampling rate of the time trace (only needed if full_output=True)
- window_startint
- window_endint
We look for the peak inside the resampled array timeseries[window_start:window_end]
- noise_startint
- noise_endint
The array timeseries[noise_start:noise_end] is used to calculate the noise level
- resample_factorint, default=1
Factor with which the timeseries will be resampled, needs to be integer > 0
- full_outputbool, default=False
If True, also the peak of the envelope, RMS and signal time are returned
- Returns:
- The SNR of the time trace
- class NuRadioReco.modules.LOFAR.stationPulseFinder.stationPulseFinder[source]
Bases:
object
Look for significant pulses in every station. The module uses beamforming to enhance the sensitivity in direction estimated from the LORA particle data. It also identifies the channels which have an SNR good enough to use for direction fitting later.
Methods
begin
([window, noise_window, cr_snr, ...])Sets the window size to use for pulse finding, as well as the number of samples away from the pulse to use for noise measurements.
run
(event, detector)Run a beamformer on all stations in event to search for significant pulses.
end
- begin(window=256, noise_window=10000, cr_snr=6.5, good_channels=6, logger_level=0)[source]
Sets the window size to use for pulse finding, as well as the number of samples away from the pulse to use for noise measurements. The function also defines what an acceptable SNR is to consider a cosmic-ray signal to be in the trace, as well as the number of good channels a station should have to be kept for further processing.
- Parameters:
- windowint, default=256
Size of the window to look for pulse
- noise_windowint, default=10000
The trace used for noise characterisation goes from sample 0 to the start of the pulse searching window minus this number.
- cr_snrfloat, default=3
The minimum SNR a channel should have to be considered having a CR signal.
- good_channelsint, default=6
The minimum number of good channels a station should have in order be “triggered”.
- logger_levelint, default=logging.NOTSET
Use this parameter to override the logging level for this module.