nu-radio / NuRadioMC

A Monte Carlo simulation package for radio neutrino detectors
GNU General Public License v3.0
35 stars 35 forks source link

Error messages while running /NuRadioReco/examples/RNO_data/station_simulation/simulate_rnog_2021.py in rnog_trigger branch #729

Open alisanozdrina opened 1 month ago

alisanozdrina commented 1 month ago

I am trying to calculate detector effective volume with low to heigh trigger settings by running the simulate_rnog_2021.py script from rnog_trigger branch:

$python simulate_rnog_2021.py RNO_single_station.json RNO_config.yaml 1e20 1e20 e cc 0 --n_triggers 5 which gives me the following error messages:

/Users/nozdrina.1/Documents/phys/software/NuRadioMC/NuRadioReco/modules/RNO_G/triggerBoardResponse.py:179: RuntimeWarning: divide by zero encountered in log2 eff_noise_bits = np.log2(vrms_after_gain[-1] / volts_per_adc) + 1 Process worker-11: Traceback (most recent call last): File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/Users/nozdrina.1/Documents/phys/software/NuRadioMC/NuRadioReco/examples/RNO_data/station_simulation/simulate_rnog_2021.py", line 219, in task n_trig = sim.run() File "/Users/nozdrina.1/Documents/phys/software/NuRadioMC/NuRadioMC/simulation/simulation.py", line 1057, in run self._detector_simulation_trigger(self._evt, self._station, self._det) File "/Users/nozdrina.1/Documents/phys/software/NuRadioMC/NuRadioReco/examples/RNO_data/station_simulation/simulate_rnog_2021.py", line 153, in _detector_simulation_trigger highLowThreshold.run( File "/Users/nozdrina.1/Documents/phys/software/NuRadioMC/NuRadioReco/modules/base/module.py", line 102, in register_run_method res = run(self, *args, **kwargs) File "/Users/nozdrina.1/Documents/phys/software/NuRadioMC/NuRadioReco/modules/trigger/highLowThreshold.py", line 210, in run triggerd_bins = get_high_low_triggers( File "/Users/nozdrina.1/Documents/phys/software/NuRadioMC/NuRadioReco/modules/trigger/highLowThreshold.py", line 40, in get_high_low_triggers m1 = np.convolve(trace > high_threshold, c, mode='full')[:-(n_bins_coincidence - 1)] ValueError: operands could not be broadcast together with shapes (502,) (4,) more than 10 jobs crashed. Exiting... 2m0s passed. No more jobs will be submitted. 0 has finished with 0 events, total number of triggered events is 0

@martin01021207 confirmed that the script worked previously, but I am not sure which commit to return to. @colemanalan, @fschlueter is this something you can please help me with?

colemanalan commented 1 month ago

Yeah it looks like several things have broken on this branch. I fixed one of them (your div-by-zero bug) but now the actual high-low trigger implementation also seems broken. I will try to take a look at that tonight. But in case I don't get a fix, Felix can probably fix this too