mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-11-12 17:43:33 +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?")
|
||||
sys.exit(1)
|
||||
|
||||
print(f"Modifying clocks upto {max_clock_offset}ns.")
|
||||
|
||||
# read in antennas
|
||||
with h5py.File(antennas_fname, 'a') as fp:
|
||||
if 'antennas' not in fp.keys():
|
||||
|
@ -53,10 +51,27 @@ if __name__ == "__main__":
|
|||
|
||||
N_antennas = len(group.keys())
|
||||
|
||||
if True: # uniform
|
||||
clock_offsets = max_clock_offset * (2*rng.uniform(size=N_antennas) - 1)
|
||||
else: # normal
|
||||
clock_offsets = max_clock_offset * rng.normal(0, 1, size=N_antennas)
|
||||
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)
|
||||
else: # normal
|
||||
print("Gaussian distribution")
|
||||
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
|
||||
for i, name in enumerate(group.keys()):
|
||||
|
|
Loading…
Reference in a new issue