From 39cff267ac7b38032ba49f624c55f67860e1dfc4 Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Tue, 22 Nov 2022 15:57:00 +0100 Subject: [PATCH] ZH: fixup ab1550c8: somehow removed beacon from trace generation --- .../aa_generate_beacon.py | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/simulations/airshower_beacon_simulation/aa_generate_beacon.py b/simulations/airshower_beacon_simulation/aa_generate_beacon.py index ab63df9..fc4ce2a 100755 --- a/simulations/airshower_beacon_simulation/aa_generate_beacon.py +++ b/simulations/airshower_beacon_simulation/aa_generate_beacon.py @@ -159,11 +159,20 @@ if __name__ == "__main__": fname = "ZH_airshower/mysim.sry" tx = Antenna(x=-500,y=0,z=0,name='tx') # m - f_beacon = 51.53e-3 # GHz + if not True: # slowest beacon to be found: + f_beacon = 10e-3 # GHz + low_bp = 5e-3 # GHz + high_bp = 80e-3 # GHz + else: # original wanted beacon + f_beacon = 51.53e-3 # GHz - # Bandpass for E field blockfilter - low_bp = 0.03 # GHz - high_bp = 0.08 # GHz + # Bandpass for E field blockfilter + low_bp = 30e-3 # GHz + high_bp = 80e-3 # GHz + + # Disable block_filter + if False: + block_filter = lambda x, dt, low, high: x beacon_amplitudes = 1e-6*np.array([1e2, 0, 0]) # mu V/m beacon_radiate_rsq = True @@ -205,8 +214,8 @@ if __name__ == "__main__": # add to relevant polarisation # and apply block filter dt = antenna.t[1] - antenna.t[0] - for j, _ in enumerate(beacon_amplitudes): - traces[j] = block_filter(traces[j], dt, low_bp, high_bp) + for j, amp in enumerate(beacon_amplitudes): + traces[j] = block_filter(traces[j] + amp*beacon, dt, low_bp, high_bp) append_antenna_hdf5( antennas_fname, antenna, traces, name='traces', prepend_time=True, attrs_dict=dict(t0=t0))