ZH: modify clock takes cli argument

This commit is contained in:
Eric Teunis de Boone 2022-11-25 11:49:55 +01:00
parent 22ccf7e3e3
commit 4131b3775a

View file

@ -19,7 +19,7 @@ if __name__ == "__main__":
from os import path
import sys
max_clock_offset = 100# ns
max_clock_offset = 100 if len(sys.argv) < 1 else int(sys.argv[1]) # ns
remake_clock_offsets = True
seed = 12345
@ -40,6 +40,8 @@ if __name__ == "__main__":
if not path.isfile(antennas_fname):
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: