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 from os import path
import sys 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 remake_clock_offsets = True
seed = 12345 seed = 12345
@ -41,6 +41,8 @@ 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():