mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 11:33:32 +01:00
Merge branch 'matrix-setup-runus' into main
This commit is contained in:
commit
0a90c93464
4 changed files with 62 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
|
||||||
FIG_DIR := ./figures
|
FIG_DIR ?= ./figures
|
||||||
|
|
||||||
-include config.mk
|
-include config.mk
|
||||||
|
|
||||||
|
|
1
simulations/airshower_beacon_simulation/matrix_base/base
Symbolic link
1
simulations/airshower_beacon_simulation/matrix_base/base
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
base
|
32
simulations/airshower_beacon_simulation/matrix_base/make_matrix.py
Executable file
32
simulations/airshower_beacon_simulation/matrix_base/make_matrix.py
Executable 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)
|
28
simulations/airshower_beacon_simulation/matrix_base/run_matrix.sh
Executable file
28
simulations/airshower_beacon_simulation/matrix_base/run_matrix.sh
Executable 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
|
Loading…
Reference in a new issue