mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 11:33:32 +01:00
ZH: employ same slicing function for phase and signal determination
This commit is contained in:
parent
b4b3aaf3e6
commit
9f16aced49
3 changed files with 11 additions and 7 deletions
|
@ -97,11 +97,15 @@ if __name__ == "__main__":
|
|||
# TODO: refine masking
|
||||
# use beacon but remove where E_AxB-Beacon != 0
|
||||
if True:
|
||||
if not 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
|
||||
N_pre, N_post = 250, 250 # TODO: make this configurable
|
||||
|
||||
max_idx = np.argmax(test_traces[0])
|
||||
|
||||
low_idx = max(0, max_idx-N_pre)
|
||||
high_idx = min(len(t_trace), max_idx+N_post)
|
||||
|
||||
t_mask = np.ones(len(t_trace), dtype=bool)
|
||||
t_mask[low_idx:high_idx] = False
|
||||
|
||||
t_trace = t_trace[t_mask]
|
||||
for j, t in enumerate(test_traces):
|
||||
|
|
|
@ -213,7 +213,7 @@ if __name__ == "__main__":
|
|||
ev.antennas[i].t_AxB += measured_repair_offsets[i]
|
||||
|
||||
if apply_signal_window_from_max:
|
||||
N_pre, N_post = 250, 250
|
||||
N_pre, N_post = 250, 250 # TODO: make this configurable
|
||||
|
||||
max_idx = np.argmax(ant.E_AxB)
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ if __name__ == "__main__":
|
|||
|
||||
# Slice the traces to a small part around the peak
|
||||
if apply_signal_window_from_max:
|
||||
N_pre, N_post = 250, 250
|
||||
N_pre, N_post = 250, 250 # TODO: make this configurable
|
||||
|
||||
for i, ant in enumerate(ev.antennas):
|
||||
max_idx = np.argmax(ant.E_AxB)
|
||||
|
|
Loading…
Reference in a new issue