ZH: invert sign for baseline phase diff a[j,i]

When building the matrix, make sure to introduce a minus sign
such that a[i,j] = - a[j,i]
This commit is contained in:
Eric Teunis de Boone 2022-12-22 16:55:04 +01:00
parent ae2cde1ab3
commit a6c62f376b

View file

@ -43,20 +43,20 @@ if __name__ == "__main__":
N_base = len(basenames)
N_ant = len(antennas)
# reshape time_diffs into N_ant x N_ant array
# reshape time_diffs into N_ant x N_ant matrix
sigma_phase_matrix = np.full( (N_ant, N_ant), np.nan, dtype=float)
#sigma_phase_matrix = np.arange(0, N_ant**2, dtype=float).reshape( (N_ant,N_ant))
## set i=i terms to 0
for i in range(N_ant):
sigma_phase_matrix[i,i] = 0
## fill matrix
name2idx = lambda name: int(name)-1
for i, b in enumerate(basenames):
idx = (name2idx(b[0]), name2idx(b[1]))
if idx[0] == idx[1]:
# hopefully 0
pass
sigma_phase_matrix[(idx[0], idx[1])] = lib.phase_mod(true_phase_diffs[i])
sigma_phase_matrix[(idx[1], idx[0])] = lib.phase_mod(true_phase_diffs[i])
sigma_phase_matrix[(idx[1], idx[0])] = lib.phase_mod(-1*true_phase_diffs[i])
mat_kwargs = dict(
norm = Normalize(vmin=-np.pi, vmax=+np.pi),
@ -82,7 +82,7 @@ if __name__ == "__main__":
if True:
# for each row j subtract the 0,j element from the whole row
# and apply phase_mod
first_row = (sigma_phase_matrix[0,:] * np.ones_like(sigma_phase_matrix)).T
first_row = -1*(sigma_phase_matrix[0,:] * np.ones_like(sigma_phase_matrix)).T
# Show subtraction Matrix as figure
if True: