mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 11:33:32 +01:00
ZH: E_AxB used for phases
This commit is contained in:
parent
b91971368d
commit
006a0903ab
1 changed files with 30 additions and 12 deletions
|
@ -62,6 +62,20 @@ if __name__ == "__main__":
|
|||
for i, name in enumerate(group.keys()):
|
||||
ant_group = group[name]
|
||||
|
||||
# use E_AxB only instead of polarisations
|
||||
if True:
|
||||
if 'E_AxB' not in ant_group.keys():
|
||||
print(f"Antenna does not have 'E_AxB' in {name}")
|
||||
sys.exit(1)
|
||||
|
||||
traces = ant_group['E_AxB']
|
||||
|
||||
t_trace = traces[0]
|
||||
test_traces = [ traces[1] ]
|
||||
orients = ['E_AxB']
|
||||
|
||||
# use separate polarisations
|
||||
else:
|
||||
if 'traces' not in ant_group.keys():
|
||||
print(f"Antenna file corrupted? no 'traces' in {name}")
|
||||
sys.exit(1)
|
||||
|
@ -69,7 +83,7 @@ if __name__ == "__main__":
|
|||
traces = ant_group['traces']
|
||||
t_trace = traces[0]
|
||||
|
||||
if not True:
|
||||
if True:
|
||||
# only take the Beacon trace
|
||||
test_traces = [traces[4]]
|
||||
orients = ['B']
|
||||
|
@ -77,6 +91,8 @@ if __name__ == "__main__":
|
|||
test_traces = traces[1:]
|
||||
orients = ['Ex', 'Ey', 'Ez', 'B']
|
||||
|
||||
# Do Fourier Transforms
|
||||
# to find phases and amplitudes
|
||||
if True:
|
||||
freqs, phases, amps = lib.find_beacon_in_traces(
|
||||
test_traces, t_trace,
|
||||
|
@ -93,8 +109,10 @@ if __name__ == "__main__":
|
|||
amps = [ 3e-7 ]
|
||||
|
||||
# choose highest amp
|
||||
#idx = np.argmax(amps, axis=1)
|
||||
idx = 0
|
||||
if False and len(phases) > 1:
|
||||
#idx = np.argmax(amplitudes, axis=-1)
|
||||
raise NotImplementedError
|
||||
|
||||
frequency = freqs[idx]
|
||||
phase = phases[idx]
|
||||
|
|
Loading…
Reference in a new issue