3 set -e # exit immediately on failed command
4 set -o pipefail # pipes fail if any stage fails
6 KFILE='./data/spring-constants'
7 AVGFILE='./data/averaged-data'
14 Kprecise=`echo "$LINE" | sed 's/.*= \([0-9.]*\) +.*/\1/'`
15 K=`python -c "print '%.2f' % $Kprecise"`
16 FILE="v-dep.d/v_dep_$K"
17 Kindex=`echo "$LINE" | sed 's/K(\([0-9.]*\)) =.*/\1/'`
29 ASYPLOTS=$(echo -e "$ASYPLOTS\ngraphFile(\"$FILE.dat\", xscale, yscale, $PEN, m8,
30 markroutine=marksize(\"$FILE.dat\", $PEN, m8, 10), t=units(\"$K\",\"pN/nm\"), dots=true);")
31 ASYPLOTS=$(echo -e "$ASYPLOTS\ngraphFile(\"$FILE.fit.dat\", xscale, yscale, $PEN,
32 t=units(\"$K\",\"pN/nm\"));")
33 GPPLOTS="$GPPLOTS, '$FILE.dat' using 1:2:(sqrt(\$4)) with points pt 6 pointsize variable t '$K (pN/nm)'"
34 GPPLOTS="$GPPLOTS, '$FILE.fit.dat' using 1:2 with lines notitle"
35 done < <(tac "$KFILE")
36 GPPLOTS="${GPPLOTS:2}" # remove leading ' ,'
38 cat > "$ASYFILE" <<HEREDOC
41 size(15cm,10cm,IgnoreAspect);
51 label(sLabel("Pulling speed dependence"), point(N),N);
52 xaxis(sLabel("Pulling speed (nm/s)"),BottomTop,LeftTicks);
53 yaxis(sLabel("Unfolding force (pN)"),LeftRight,RightTicks);
55 add(legend(),point(E),20E,UnFill);