mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 11:33:32 +01:00
ZH: hardcoded some clock offsets
This commit is contained in:
parent
3cbdadc5ba
commit
7cfccd0011
1 changed files with 21 additions and 6 deletions
|
@ -41,8 +41,6 @@ if __name__ == "__main__":
|
||||||
print("Antenna file cannot be found, did you try generating a beacon?")
|
print("Antenna file cannot be found, did you try generating a beacon?")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
print(f"Modifying clocks upto {max_clock_offset}ns.")
|
|
||||||
|
|
||||||
# read in antennas
|
# read in antennas
|
||||||
with h5py.File(antennas_fname, 'a') as fp:
|
with h5py.File(antennas_fname, 'a') as fp:
|
||||||
if 'antennas' not in fp.keys():
|
if 'antennas' not in fp.keys():
|
||||||
|
@ -53,10 +51,27 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
N_antennas = len(group.keys())
|
N_antennas = len(group.keys())
|
||||||
|
|
||||||
if True: # uniform
|
if not True:
|
||||||
|
print(f"Modifying clocks upto {max_clock_offset}ns.")
|
||||||
|
clock_offsets = np.zeros( N_antennas )
|
||||||
|
if not True: # uniform
|
||||||
|
print("Uniform distribution")
|
||||||
clock_offsets = max_clock_offset * (2*rng.uniform(size=N_antennas) - 1)
|
clock_offsets = max_clock_offset * (2*rng.uniform(size=N_antennas) - 1)
|
||||||
else: # normal
|
else: # normal
|
||||||
|
print("Gaussian distribution")
|
||||||
clock_offsets = max_clock_offset * rng.normal(0, 1, size=N_antennas)
|
clock_offsets = max_clock_offset * rng.normal(0, 1, size=N_antennas)
|
||||||
|
else: # Hardcoded offsets
|
||||||
|
print("Hardcoded offsets")
|
||||||
|
|
||||||
|
f_beacon = 51.53e-3 # GHz
|
||||||
|
|
||||||
|
clock_offsets = np.zeros( N_antennas )
|
||||||
|
if False:
|
||||||
|
clock_offsets[59] = np.pi/2 / (2*np.pi*f_beacon)
|
||||||
|
elif True:
|
||||||
|
clock_offsets += 1/8 * 1/f_beacon
|
||||||
|
print(clock_offsets)
|
||||||
|
|
||||||
|
|
||||||
# modify time values of each antenna
|
# modify time values of each antenna
|
||||||
for i, name in enumerate(group.keys()):
|
for i, name in enumerate(group.keys()):
|
||||||
|
|
Loading…
Reference in a new issue