ZH: remove time delay from actual phase_sigma

This commit is contained in:
Eric Teunis de Boone 2022-12-08 11:22:33 +01:00
parent 4c9e91489d
commit b11e6f3756

View file

@ -75,19 +75,22 @@ if __name__ == "__main__":
# save phase difference with antenna names # save phase difference with antenna names
phase_diffs[i] = [f_beacon, true_phases_diff] phase_diffs[i] = [f_beacon, true_phases_diff]
# Read actual phases from antenna hdf5 beacon.write_baseline_time_diffs_hdf5(time_diffs_fname, baselines, phase_diffs[:,1], [0]*len(phase_diffs), phase_diffs[:,0])
actual_antenna_phases = { a.name: 2*np.pi*a.attrs['clock_offset']*f_beacon for a in antennas }
# Read actual phases from antenna hdf5
actual_antenna_measured_phases = { a.name: 2*np.pi*a.attrs['clock_offset']*f_beacon for a in antennas }
# Compare actual time shifts # Compare actual time shifts
my_phase_diffs = [] my_phase_diffs = []
for i,b in enumerate(baselines): for i,b in enumerate(baselines):
actual_phase_diff = lib.phase_mod( lib.phase_mod(actual_antenna_phases[b[1].name]) - lib.phase_mod(actual_antenna_phases[b[0].name])) actual_phase_measured_diff = lib.phase_mod( lib.phase_mod(actual_antenna_measured_phases[b[1].name]) - lib.phase_mod(actual_antenna_measured_phases[b[0].name]))
if True: # remove time axis phase difference # remove phase due to time delay from transmitter difference
t0s = np.array([ant.t_AxB[0] for ant in base]) tds = np.array([ lib.geometry_time(tx, ant, c_light=c_light) for ant in base])
delta_t0 = t0s[1] - t0s[1] delta_td = tds[1] - tds[0]
actual_phase_diff = lib.phase_mod( actual_phase_diff - lib.phase_mod(delta_t0*2*np.pi*f_beacon)) delta_td_phase = lib.phase_mod(delta_td*2*np.pi*f_beacon)
actual_phase_diff = lib.phase_mod( actual_phase_measured_diff - delta_td_phase)
my_phase_diffs.append(actual_phase_diff) my_phase_diffs.append(actual_phase_diff)
# Make a plot # Make a plot