#!/bin/bash # # Once we have force lists for each velocity, make histograms and F(V) chart. > v_dep for V in $* do # make histograms OUT=`python -c "import numpy; a=numpy.fromfile('data_$V', sep=' '); print a.mean(), a.std()"` AVG=`echo "$OUT" | cut -d\ -f1` STD=`echo "$OUT" | cut -d\ -f2` #AVG=`awk 'BEGIN{s=0}{s += $1}END{print s/NR}' data_$V` #STD=`awk "BEGIN{s=0}{s += (\$1-$AVG)**2}END{print ... s/NR}" data_$V` echo -e "$V\t$AVG\t$STD" >> v_dep cat data_$V | stem_leaf -v-1 -b1e-12 | cut -d\ -f1,3 > hist_$V done echo "#set terminal png #set output 'v_dep.png' set logscale x set xlabel 'Pulling speed (um/s)' set ylabel 'Unfolding force (pN)' plot 'v_dep' using (\$1*1e6):(\$2*1e12) with points" > v_dep.gp