summaryrefslogtreecommitdiff
path: root/hp_height_study_driver.sh
diff options
context:
space:
mode:
authorConnor Moore <connor.moore@psi.ch>2026-07-10 09:56:42 +0200
committerConnor Moore <connor.moore@psi.ch>2026-07-10 09:56:42 +0200
commitaa4391a8d1eb3795a97640d80008a99ce4068dad (patch)
tree60c3bd73748afffe404c0e81820c33b5c8fa5304 /hp_height_study_driver.sh
parentb4037e62ff173b5850bb500ad169eb7a7228079f (diff)
Updated driving scripts, plotting scripts, utility scripts
Diffstat (limited to 'hp_height_study_driver.sh')
-rwxr-xr-xhp_height_study_driver.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/hp_height_study_driver.sh b/hp_height_study_driver.sh
index e202d8c..4c897e5 100755
--- a/hp_height_study_driver.sh
+++ b/hp_height_study_driver.sh
@@ -1,8 +1,11 @@
#!/bin/bash
-mkdir -p results/outputs
-touch results/keff_table
-echo "#" $(date) > results/keff_table
+if [[ $1 != "merlin" ]]; then
+ mkdir -p results/outputs
+ touch results/keff_table
+ echo "#" $(date) > results/keff_table
+ results_dir=results/outputs
+fi
if [[ $1 == "lclrs" ]]; then
@@ -11,6 +14,7 @@ if [[ $1 == "lclrs" ]]; then
elif [[ $1 == "merlin" ]]; then
prog=(../krusty.py)
pool_seq=$2
+ results_dir=.
else
prog=(./krusty.py -r)
pool_seq=$(seq 1 45)
@@ -22,12 +26,12 @@ reset="\e[0m"
for pool_height in $pool_seq; do
echo -e "$green Starting runs for $pool_height cm pool height... $reset"
for sat_height in $(seq $pool_height 45); do
- output_file=results/outputs/p$pool_height\_s$sat_height.out
+ output_file=$results_dir/p$pool_height\_s$sat_height.out
"${prog[@]}" -p $pool_height -s $sat_height > $output_file
keff=$(cat $output_file | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "+" -f 1)
pm=$(cat $output_file | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "-" -f 2)
md5=$(cat $output_file | grep "MD5:" | cut -d ":" -f 2 | sed "s/ //g")
echo K-eff $keff +/- $pm found for p=$pool_height and s=$sat_height \($md5\)
- echo $pool_height $sat_height $keff $pm $(hostname) $md5 \($(date)\) >> results/keff_table
+ if [[ $1 != "merlin" ]]; then echo $pool_height $sat_height $keff $pm $(hostname) $md5 \($(date)\) >> results/keff_table; fi
done
done