nu-radio / NuRadioReco

reconstruction framework for radio detectors of high-energy neutrinos
GNU General Public License v3.0
5 stars 3 forks source link

Integrated power SNR calculation looks wrong #278

Closed christophwelling closed 3 years ago

christophwelling commented 3 years ago

The way the integrated power SNR is calculated in the channelSignalReconstructor looks wrong:

  1. It sometimes produces the warning: /home/christoph/Software/NuRadioReco/NuRadioReco/modules/channelSignalReconstructor.py:135: RuntimeWarning: divide by zero encountered in double_scalars SNR['integrated_power'] /= (noise_int / signal_window_start) /home/christoph/Software/NuRadioReco/NuRadioReco/modules/channelSignalReconstructor.py:136: RuntimeWarning: invalid value encountered in sqrt SNR['integrated_power'] = np.sqrt(SNR['integrated_power'])
  2. Dividing by signal_window_start makes no sense

Git says that @anelles wrote this code, so I am assigning you. I have no idea what the logic behind this is supposed to be

cg-laser commented 3 years ago

I also found this weird. I pushed a few changes to at least avoid divisions by zero or other warnings. But I think we can also just remove it. I don't know of anyone who is using it.

anelles commented 3 years ago

Fixed already in #259