mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-11-13 10:03:32 +01:00
ZH: let modify_clock use filtered_traces
This commit is contained in:
parent
5fca4a8bda
commit
6151199650
1 changed files with 5 additions and 3 deletions
|
@ -84,11 +84,13 @@ if __name__ == "__main__":
|
|||
|
||||
|
||||
# modify time values of each antenna
|
||||
trace_key = 'filtered_traces'
|
||||
for i, name in enumerate(group.keys()):
|
||||
h5ant = group[name]
|
||||
clk_offset = clock_offsets[i]
|
||||
|
||||
if 'traces' not in h5ant.keys():
|
||||
|
||||
if trace_key not in h5ant.keys():
|
||||
print(f"Antenna file corrupted? no 'traces' in {name}")
|
||||
sys.exit(1)
|
||||
|
||||
|
@ -96,14 +98,14 @@ if __name__ == "__main__":
|
|||
if 'clock_offset' in h5ant_attrs:
|
||||
tmp_offset = h5ant_attrs['clock_offset']
|
||||
if remake_clock_offsets:
|
||||
h5ant['traces'][0, :] -= tmp_offset
|
||||
h5ant[trace_key][0, :] -= tmp_offset
|
||||
h5ant['E_AxB'][0, :] -= tmp_offset
|
||||
else:
|
||||
clock_offsets[i] = tmp_offset
|
||||
continue
|
||||
|
||||
h5ant_attrs['clock_offset'] = clk_offset
|
||||
h5ant['traces'][0, :] += clk_offset
|
||||
h5ant[trace_key][0, :] += clk_offset
|
||||
h5ant['E_AxB'][0, :] += clk_offset
|
||||
|
||||
# save to simple csv
|
||||
|
|
Loading…
Reference in a new issue