From beb2f43237ee7ef6b1a932ca0b3f8817cf64f01a Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 15 Mar 2010 09:12:38 -0400 Subject: [PATCH] Renamed "plot-splits" to the more obvious "v-dep" --- tex/src/figures/cantilever-data/Makefile | 22 +++---- tex/src/figures/cantilever-data/get_v_dep.sh | 32 ++++++++++ tex/src/figures/cantilever-data/make_plots.sh | 63 ------------------- 3 files changed, 43 insertions(+), 74 deletions(-) create mode 100755 tex/src/figures/cantilever-data/get_v_dep.sh delete mode 100755 tex/src/figures/cantilever-data/make_plots.sh diff --git a/tex/src/figures/cantilever-data/Makefile b/tex/src/figures/cantilever-data/Makefile index 4a8bea2..646a566 100644 --- a/tex/src/figures/cantilever-data/Makefile +++ b/tex/src/figures/cantilever-data/Makefile @@ -3,14 +3,14 @@ ASYPROCESS = ../asy/asyprocess \ --pretex='\documentclass{drexel-thesis} \input{packages}' \ -- -FIGS = plot-splits loading-rate -DATA = plot-splits.d/v_dep_131.98.dat \ - plot-splits.d/v_dep_131.98.fit \ - plot-splits.d/v_dep_24.33.dat \ - plot-splits.d/v_dep_24.33.fit \ +FIGS = v-dep loading-rate +DATA = v-dep.d/v_dep_131.98.dat \ + v-dep.d/v_dep_131.98.fit \ + v-dep.d/v_dep_24.33.dat \ + v-dep.d/v_dep_24.33.fit \ loading-rate.d/loading_rate_131.98 \ loading-rate.d/loading_rate_24.33 -DATA_DIRS = data plot-splits.d loading-rate.d +DATA_DIRS = data v-dep.d loading-rate.d all : $(FIGS:%=%_.tex) @@ -30,20 +30,20 @@ data/raw : extract_f_v_k_data.sh $(DATA_DIRS) data/spring-constants data/averaged-data : avg_data.py data/raw python $< -plot-splits.asy plot-splits.gp plot-splits.d/v_dep_%.dat : \ +v-dep.asy v-dep.gp v-dep.d/v_dep_%.dat : \ make_plots.sh data/spring-constants data/averaged-data ./$< -plot-splits.d/v_dep_%.fit : fit_data.py plot-splits.d/v_dep_%.dat +v-dep.d/v_dep_%.fit : fit_data.py v-dep.d/v_dep_%.dat python $^ > $@ -plot-splits.pdf : plot-splits.gp plot-splits.d/v_dep_* +v-dep.pdf : v-dep.gp v-dep.d/v_dep_* gnuplot $< -plot-splits.eps : plot-splits.pdf +v-dep.eps : v-dep.pdf pdftoeps $< -plot-splits-rotated.pdf : plot-splits.pdf +v-dep-rotated.pdf : v-dep.pdf pdftk $< cat 1E output $@ loading-rate.d/loading_rate_% : get_loading_rates.py avg_data.py data/raw diff --git a/tex/src/figures/cantilever-data/get_v_dep.sh b/tex/src/figures/cantilever-data/get_v_dep.sh new file mode 100755 index 0000000..bf6385d --- /dev/null +++ b/tex/src/figures/cantilever-data/get_v_dep.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +KFILE='./data/spring-constants' +AVGFILE='./data/averaged-data' +ASYSPLIT='./v-dep.asy' +GPSPLIT='./v-dep.gp' + +PLOTS="" +while read LINE +do + Kprecise=`echo "$LINE" | sed 's/.*= \([0-9.]*\) +.*/\1/'` + K=`python -c "print '%.2f' % $Kprecise"` + FILE="v-dep.d/v_dep_$K" + echo "clearing $FILE" + > "$FILE.dat" + rm -f "$FILE.fit" + PLOTS="$PLOTS, '$FILE.dat' using 1:2:(sqrt(\$4)) with points pt 6 pointsize variable t '$K (pN/nm)'" + PLOTS="$PLOTS, '$FILE.fit' using 1:2 with lines notitle" +done < <(tac "$KFILE") +PLOTS="${PLOTS:2}" # remove leading ' ,' + +while read DATA +do + V=`echo "$DATA" | awk '{print $1}'` + K=`echo "$DATA" | awk '{print $2}'` + F=`echo "$DATA" | awk '{print $3}'` + Fstd=`echo "$DATA" | awk '{print $4}'` + N=`echo "$DATA" | awk '{print $5}'` + FILE="v-dep.d/v_dep_$K" + echo "adding $V, $F, $Fstd, $N to $FILE.dat" + echo -e "$V\t$F\t$Fstd\t$N" >> "$FILE.dat" +done < <(cat "$AVGFILE" | grep -v '^#') diff --git a/tex/src/figures/cantilever-data/make_plots.sh b/tex/src/figures/cantilever-data/make_plots.sh deleted file mode 100755 index 081dae6..0000000 --- a/tex/src/figures/cantilever-data/make_plots.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -KFILE='./data/spring-constants' -AVGFILE='./data/averaged-data' -ASYSPLIT='./plot-splits.asy' -GPSPLIT='./plot-splits.gp' - -PLOTS="" -while read LINE -do - Kprecise=`echo "$LINE" | sed 's/.*= \([0-9.]*\) +.*/\1/'` - K=`python -c "print '%.2f' % $Kprecise"` - FILE="plot-splits.d/v_dep_$K" - echo "clearing $FILE" - > "$FILE.dat" - rm -f "$FILE.fit" - PLOTS="$PLOTS, '$FILE.dat' using 1:2:(sqrt(\$4)) with points pt 6 pointsize variable t '$K (pN/nm)'" - PLOTS="$PLOTS, '$FILE.fit' using 1:2 with lines notitle" -done < <(tac "$KFILE") -PLOTS="${PLOTS:2}" # remove leading ' ,' - -while read DATA -do - V=`echo "$DATA" | awk '{print $1}'` - K=`echo "$DATA" | awk '{print $2}'` - F=`echo "$DATA" | awk '{print $3}'` - Fstd=`echo "$DATA" | awk '{print $4}'` - N=`echo "$DATA" | awk '{print $5}'` - FILE="plot-splits.d/v_dep_$K" - echo "adding $V, $F, $Fstd, $N to $FILE.dat" - echo -e "$V\t$F\t$Fstd\t$N" >> "$FILE.dat" -done < <(cat "$AVGFILE" | grep -v '^#') - -cat > "$ASYSPLIT" < "GPSPLIT" <