efbfbf: upgrade to Bugs Everywhere Directory v1.5
[sawsim.git] / pysawsim / vel_dep_graph
1 #!/bin/bash
2 #
3 # Once we have force lists for each velocity, make histograms and F(V) chart.
4
5 > v_dep
6 for V in $*
7 do
8   # make histograms
9   OUT=`python -c "import numpy; a=numpy.fromfile('data_$V', sep=' '); print a.mean(), a.std()"`
10   AVG=`echo "$OUT" | cut -d\  -f1`
11   STD=`echo "$OUT" | cut -d\  -f2`
12   #AVG=`awk 'BEGIN{s=0}{s += $1}END{print s/NR}' data_$V`
13   #STD=`awk "BEGIN{s=0}{s += (\$1-$AVG)**2}END{print ...  s/NR}" data_$V`
14   echo -e "$V\t$AVG\t$STD" >> v_dep
15   cat data_$V | stem_leaf -v-1 -b1e-12 | cut -d\  -f1,3 > hist_$V
16 done
17
18 echo "#set terminal png
19 #set output 'v_dep.png'
20 set logscale x
21 set xlabel 'Pulling speed (um/s)'
22 set ylabel 'Unfolding force (pN)'
23 plot  'v_dep' using (\$1*1e6):(\$2*1e12) with points" > v_dep.gp