mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 11:33:32 +01:00
ZH: ca: make sure to only modify t_AxB in antennas
This commit is contained in:
parent
a7a5036823
commit
0447df4f43
1 changed files with 9 additions and 9 deletions
|
@ -158,7 +158,7 @@ if __name__ == "__main__":
|
||||||
Xref = 400
|
Xref = 400
|
||||||
|
|
||||||
N_runs = 3
|
N_runs = 3
|
||||||
remove_beacon_from_trace = False
|
remove_beacon_from_trace = True
|
||||||
|
|
||||||
####
|
####
|
||||||
fname_dir = path.dirname(fname)
|
fname_dir = path.dirname(fname)
|
||||||
|
@ -186,11 +186,6 @@ if __name__ == "__main__":
|
||||||
freq_name = next(iter(freq_names))
|
freq_name = next(iter(freq_names))
|
||||||
f_beacon = ev.antennas[0].beacon_info[freq_name]['freq']
|
f_beacon = ev.antennas[0].beacon_info[freq_name]['freq']
|
||||||
|
|
||||||
# determine allowable ks per location
|
|
||||||
dt = ev.antennas[0].t[1] - ev.antennas[0].t[0]
|
|
||||||
allowed_sample_shifts = np.rint(allowed_ks/f_beacon /dt).astype(int)
|
|
||||||
print("Checking:", allowed_ks, ": shifts :", allowed_sample_shifts)
|
|
||||||
|
|
||||||
# Prepare polarisation and passbands
|
# Prepare polarisation and passbands
|
||||||
rit.set_pol_and_bp(ev, low=0.03, high=0.08)
|
rit.set_pol_and_bp(ev, low=0.03, high=0.08)
|
||||||
|
|
||||||
|
@ -200,14 +195,14 @@ if __name__ == "__main__":
|
||||||
clock_phase = ant.beacon_info[freq_name]['sigma_phase_mean']
|
clock_phase = ant.beacon_info[freq_name]['sigma_phase_mean']
|
||||||
clock_phase_time = clock_phase/(2*np.pi*f_beacon)
|
clock_phase_time = clock_phase/(2*np.pi*f_beacon)
|
||||||
|
|
||||||
ev.antennas[i].orig_t = ev.antennas[i].t
|
ev.antennas[i].orig_t = ev.antennas[i].t_AxB
|
||||||
ev.antennas[i].t += clock_phase_time
|
ev.antennas[i].t_AxB += clock_phase_time
|
||||||
|
|
||||||
if remove_beacon_from_trace:
|
if remove_beacon_from_trace:
|
||||||
meas_phase = ant.beacon_info[freq_name]['phase']
|
meas_phase = ant.beacon_info[freq_name]['phase']
|
||||||
f = ant.beacon_info[freq_name]['freq']
|
f = ant.beacon_info[freq_name]['freq']
|
||||||
ampl = ant.beacon_info[freq_name]['amplitude']
|
ampl = ant.beacon_info[freq_name]['amplitude']
|
||||||
calc_beacon = lib.sine_beacon(f, ev.antennas[i].t, amplitude=ampl, phase=meas_phase+clock_phase)
|
calc_beacon = lib.sine_beacon(f, ev.antennas[i].t_AxB, amplitude=ampl, phase=meas_phase-clock_phase)
|
||||||
|
|
||||||
ev.antennas[i].E_AxB -= calc_beacon
|
ev.antennas[i].E_AxB -= calc_beacon
|
||||||
|
|
||||||
|
@ -245,6 +240,11 @@ if __name__ == "__main__":
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
|
|
||||||
|
# determine allowable ks per location
|
||||||
|
dt = ev.antennas[0].t_AxB[1] - ev.antennas[0].t_AxB[0]
|
||||||
|
allowed_sample_shifts = np.rint(allowed_ks/f_beacon /dt).astype(int)
|
||||||
|
print("Checking:", allowed_ks, ": shifts :", allowed_sample_shifts)
|
||||||
|
|
||||||
##
|
##
|
||||||
## Determine grid positions
|
## Determine grid positions
|
||||||
##
|
##
|
||||||
|
|
Loading…
Reference in a new issue