From e06d3f13d02ae1720362b18e3a7307730759af3d Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Wed, 22 Mar 2023 15:36:02 +0100 Subject: [PATCH] ZH: lib/rit: normalise P in pow_and_time --- simulations/airshower_beacon_simulation/lib/rit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simulations/airshower_beacon_simulation/lib/rit.py b/simulations/airshower_beacon_simulation/lib/rit.py index db2704c..cf6a4f6 100644 --- a/simulations/airshower_beacon_simulation/lib/rit.py +++ b/simulations/airshower_beacon_simulation/lib/rit.py @@ -58,6 +58,8 @@ def pow_and_time(test_loc,ev,dt=1.0): a_sum = np.add(a_sum,a_int) if len(a_sum) != 0: P = np.sum(np.square(np.absolute(np.fft.fft(a_sum)))) + # normalise P with the length of the traces + P = P/( t_sum[-1] - t_sum[0]) else: print("ERROR, a_sum lenght = 0", "tmin ",t_min,