mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-11-14 02:23:32 +01:00
32 lines
792 B
Python
Executable file
32 lines
792 B
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import os.path as path
|
|
from itertools import product
|
|
|
|
baselines = [ '', 72 ]
|
|
noise_sigmas = [ 0, '1e4' ]
|
|
clock_devs = [0, 20]
|
|
trace_lengths = [ 4096 ]#, 16384 ]
|
|
|
|
for options in product(baselines, clock_devs, noise_sigmas, trace_lengths):
|
|
baseline, clk_dev, noise, trace = options
|
|
|
|
dirname = f"matrix_c{clk_dev}_b{baseline}_N{trace}_noise{noise}"
|
|
print(dirname)
|
|
|
|
# Make directory
|
|
if path.exists(dirname):
|
|
print(f"{dirname} already exists! continuing..")
|
|
|
|
os.makedirs(dirname, exist_ok=True)
|
|
|
|
# Setup config.mk
|
|
with open(path.join(dirname, 'env.sh'), 'w') as fp:
|
|
template = f"""
|
|
export CLK_DEV={clk_dev}
|
|
export REF_ANTS={baseline}
|
|
export NOISE_SIGMA={noise}
|
|
export TRACE_N={trace}
|
|
"""
|
|
fp.write(template)
|