Merge branch 'matrix-setup-runus' into main

This commit is contained in:
Eric Teunis de Boone 2023-02-03 17:53:55 +01:00
commit 0a90c93464
4 changed files with 62 additions and 1 deletions

View file

@ -1,6 +1,6 @@
.PHONY: all .PHONY: all
FIG_DIR := ./figures FIG_DIR ?= ./figures
-include config.mk -include config.mk

View file

@ -0,0 +1 @@
base

View file

@ -0,0 +1,32 @@
#!/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)

View file

@ -0,0 +1,28 @@
#!/bin/bash
MATRIXDIR='/scratch/etdeboone/matrix'
MATRIX_ELS="${@:-$MATRIXDIR/matrix*/}"
BASE=$(realpath ../base)
MAKE="make -C ${BASE} "
for d in "$MATRIX_ELS" ;
do
echo "Entering $d"
pushd "$d";
# Source constants
. env.sh
export FIG_DIR=$(realpath "./figures")
export DATA_DIR=$(realpath "./data")
mkdir -p $FIG_DIR $DATA_DIR
$MAKE beacon;
$MAKE clocks;
$MAKE phases;
$MAKE findks;
#$MAKE reconstruct;
echo "Popping"
popd
done