ZH: mask the beacon where we have signal (optional)

This commit is contained in:
Eric Teunis de Boone 2022-12-08 12:02:48 +01:00
parent b11e6f3756
commit 888d81c1f6

View file

@ -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():