diff options
| -rwxr-xr-x | extract_ranges.sh | 4 | ||||
| -rwxr-xr-x | extract_to_table.sh | 33 | ||||
| -rwxr-xr-x | hp_height_study_driver.sh | 14 | ||||
| -rw-r--r-- | plot.gnu | 25 |
4 files changed, 70 insertions, 6 deletions
diff --git a/extract_ranges.sh b/extract_ranges.sh index 2c51300..d0a58c4 100755 --- a/extract_ranges.sh +++ b/extract_ranges.sh @@ -7,8 +7,10 @@ pool_heights=$(cat results/keff_table | awk '{print $1}' | uniq) for ph in $pool_heights; do # Find min and max - output=$(cat results/keff_table | awk -v var=$ph '$1 == var {print $3}') + output=$(cat results/keff_table | awk -v var=$ph '$1 == var {print $3}' | sed 's/ /\n/g') + echo -e "${output}" min_k=$(echo "$output" | sort -g | head -n 1) max_k=$(echo "$output" | sort -g | tail -n 1) + echo PH:: $ph MIN:: $min_k MAX:: $max_k echo $ph $min_k $max_k >> results/range_table done diff --git a/extract_to_table.sh b/extract_to_table.sh new file mode 100755 index 0000000..b2e62eb --- /dev/null +++ b/extract_to_table.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Initialize table +echo "#" $(date) > results/keff_table + +# Generate a k-eff table + +files=$(ls results/*.out) + + +for file in $files; do + ph=$(echo $file | cut -d "/" -f 2 | cut -d "." -f 1 | cut -d "_" -f 1 | sed 's/p//') + sh=$(echo $file | cut -d "/" -f 2 | cut -d "." -f 1 | cut -d "_" -f 2 | sed 's/s//') + keff=$(cat $file | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "+" -f 1 | sed 's/ //g') + pm=$(cat $file | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "-" -f 2 | sed 's/ //g') + echo POOL: $ph SAT: $sh :::: KEFF: $keff +/- $pm + echo $ph $sh $keff $pm >> results/keff_table +done + +# sort the table +sort -o results/keff_table results/keff_table -k1,2g + +# fully saturated table +cat results/keff_table | awk '$2==45 {print}' > results/keff_45s_table + +# three quarter saturated table +cat results/keff_table | awk '$2==35 {print}' > results/keff_35s_table + +# half saturated table +cat results/keff_table | awk '$2==25 {print}' > results/keff_25s_table + +# one quarter saturated table +cat results/keff_table | awk '$2==15 {print}' > results/keff_15s_table 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 diff --git a/plot.gnu b/plot.gnu new file mode 100644 index 0000000..7edaecd --- /dev/null +++ b/plot.gnu @@ -0,0 +1,25 @@ +set term qt 1 persist +set format y "%.5f" +set xlabel "Pool Height [cm]" +set ylabel "k_{eff}" +set key outside top center horizontal +set grid +set style fill transparent solid 0.25 noborder + +set arrow from first 10.16, graph 0 to first 10.16, graph 1 nohead dt 2 lw 2 lc rgb "grey" +set arrow from first 35.16, graph 0 to first 35.16, graph 1 nohead dt 2 lw 2 lc rgb "grey" + +plot "results/keff_45s_table" using 1:($3-$4):($3+$4) with filledcurves lc rgb "blue" notitle, \ + "results/keff_45s_table" using 1:3 with linespoints pt 7 ps 0.8 lw 2 lc rgb "blue" title "K_{eff} (4/4 Saturated Wick)", \ + "results/keff_35s_table" using 1:($3-$4):($3+$4) with filledcurves lc rgb "red" notitle, \ + "results/keff_35s_table" using 1:3 with linespoints pt 7 ps 0.8 lw 2 lc rgb "red" title "K_{eff} (3/4 Saturated Wick)", \ + "results/keff_25s_table" using 1:($3-$4):($3+$4) with filledcurves lc rgb "green" notitle, \ + "results/keff_25s_table" using 1:3 with linespoints pt 7 ps 0.8 lw 2 lc rgb "green" title "K_{eff} (2/4 Saturated Wick)", \ + "results/keff_15s_table" using 1:($3-$4):($3+$4) with filledcurves lc rgb "orange" notitle, \ + "results/keff_15s_table" using 1:3 with linespoints pt 7 ps 0.8 lw 2 lc rgb "orange" title "K_{eff} (1/4 Saturated Wick)", \ + +set term qt 2 persist + +plot "results/range_table" using 1:2:3 with filledcurves lc rgb "blue" notitle, \ + "results/range_table" using 1:3 with linespoints pt 7 ps 0.8 lw 2 lc rgb "red" title "Maximum K_{eff} (Fully Saturated Wick)", \ + "results/range_table" using 1:2 with linespoints pt 7 ps 0.8 lw 2 lc rgb "green" title "Minimum K_{eff} (Unsaturated Wick)" |
