mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-11-13 10:03: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()):
|
for i, name in enumerate(group.keys()):
|
||||||
ant_group = group[name]
|
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():
|
if 'traces' not in ant_group.keys():
|
||||||
print(f"Antenna file corrupted? no 'traces' in {name}")
|
print(f"Antenna file corrupted? no 'traces' in {name}")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -69,7 +83,7 @@ if __name__ == "__main__":
|
||||||
traces = ant_group['traces']
|
traces = ant_group['traces']
|
||||||
t_trace = traces[0]
|
t_trace = traces[0]
|
||||||
|
|
||||||
if not True:
|
if True:
|
||||||
# only take the Beacon trace
|
# only take the Beacon trace
|
||||||
test_traces = [traces[4]]
|
test_traces = [traces[4]]
|
||||||
orients = ['B']
|
orients = ['B']
|
||||||
|
@ -77,6 +91,8 @@ if __name__ == "__main__":
|
||||||
test_traces = traces[1:]
|
test_traces = traces[1:]
|
||||||
orients = ['Ex', 'Ey', 'Ez', 'B']
|
orients = ['Ex', 'Ey', 'Ez', 'B']
|
||||||
|
|
||||||
|
# Do Fourier Transforms
|
||||||
|
# to find phases and amplitudes
|
||||||
if True:
|
if True:
|
||||||
freqs, phases, amps = lib.find_beacon_in_traces(
|
freqs, phases, amps = lib.find_beacon_in_traces(
|
||||||
test_traces, t_trace,
|
test_traces, t_trace,
|
||||||
|
@ -93,8 +109,10 @@ if __name__ == "__main__":
|
||||||
amps = [ 3e-7 ]
|
amps = [ 3e-7 ]
|
||||||
|
|
||||||
# choose highest amp
|
# choose highest amp
|
||||||
#idx = np.argmax(amps, axis=1)
|
|
||||||
idx = 0
|
idx = 0
|
||||||
|
if False and len(phases) > 1:
|
||||||
|
#idx = np.argmax(amplitudes, axis=-1)
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
frequency = freqs[idx]
|
frequency = freqs[idx]
|
||||||
phase = phases[idx]
|
phase = phases[idx]
|
||||||
|
|
Loading…
Reference in a new issue