From 888d81c1f6435b7de15ba1686dee1ada6ee83a98 Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Thu, 8 Dec 2022 12:02:48 +0100 Subject: [PATCH] ZH: mask the beacon where we have signal (optional) --- .../ba_beacon_phases.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/simulations/airshower_beacon_simulation/ba_beacon_phases.py b/simulations/airshower_beacon_simulation/ba_beacon_phases.py index 74d66ba..fa540f1 100755 --- a/simulations/airshower_beacon_simulation/ba_beacon_phases.py +++ b/simulations/airshower_beacon_simulation/ba_beacon_phases.py @@ -87,6 +87,20 @@ if __name__ == "__main__": test_traces = [ traces[1] ] orients = ['E_AxB'] + # TODO: refine masking + # use beacon but remove where E_AxB-Beacon != 0 + if True: + if True: + t_mask = np.isclose(h5ant['E_AxB'][1], h5ant['traces'][4], rtol=1e-3, atol=1e-3) + else: + t_mask = np.ones(len(t_trace), dtype=bool) + t_mask[1500:3000] = False # magic numbers from aa_generate_beacon + + t_trace = t_trace[t_mask] + for j, t in enumerate(test_traces): + test_traces[j] = t[t_mask] + orients[j] = orients[j] + ' masked' + # use separate polarisations else: if 'traces' not in h5ant.keys():