--
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 \
+ loading-rate.d/loading_rate_131.98 \
+ loading-rate.d/loading_rate_24.33
+DATA_DIRS = data plot-splits.d loading-rate.d
all : $(FIGS:%=%_.tex)
clean :
- rm -f $(FIGS:%=%_*) $(FIGS:%=%-*)
+ rm -f $(FIGS:%=%_*) $(FIGS:%=%-*) *.pyc
+ #rm -rf $(DATA_DIRS)
-%_.tex : %.asy
+%_.tex : %.asy $(DATA)
$(ASYPROCESS) $(patsubst %.asy, %, $<)
+
+$(DATA_DIRS) :
+ mkdir $@
+
+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 : \
+ make_plots.sh data/spring-constants data/averaged-data
+ ./$<
+
+plot-splits.d/v_dep_%.fit : fit_data.py plot-splits.d/v_dep_%.dat
+ python $^ > $@
+
+plot-splits.pdf : plot-splits.gp plot-splits.d/v_dep_*
+ gnuplot $<
+
+plot-splits.eps : plot-splits.pdf
+ pdftoeps $<
+
+plot-splits-rotated.pdf : plot-splits.pdf
+ pdftk $< cat 1E output $@
+
+loading-rate.d/loading_rate_% : get_loading_rates.py avg_data.py data/raw
+ python $<
real xscale=1;
real yscale=1;
-graphFile("loading-rate.d/loading_rate_131.98", xscale, yscale, phard, m8, t=units("131.98","pN/nm"), dots=true);
-graphFile("loading-rate.d/loading_rate_24.33", xscale, yscale, red, m8, t=units("24.33","pN/nm"), dots=true);
+graphFile("loading-rate.d/loading_rate_131.98", xscale, yscale, phard, m8,
+ t=units("131.98","pN/nm"), dots=true);
+graphFile("loading-rate.d/loading_rate_24.33", xscale, yscale, red, m8,
+ t=units("24.33","pN/nm"), dots=true);
xlimits(1,3e3);
ylimits(90,620);
#!/bin/bash
-KFILE='./spring_constants'
-AVGFILE='./averaged_data'
-GPSPLIT='./plot_splits.gp'
+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="v_dep_$K"
+ FILE="plot-splits.d/v_dep_$K"
echo "clearing $FILE"
- > "$FILE"
- rm "$FILE.fit"
- PLOTS="$PLOTS, '$FILE' using 1:2:(sqrt(\$4)) with points pt 6 pointsize variable t '$K (pN/nm)'"
+ > "$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 ' ,'
F=`echo "$DATA" | awk '{print $3}'`
Fstd=`echo "$DATA" | awk '{print $4}'`
N=`echo "$DATA" | awk '{print $5}'`
- FILE="v_dep_$K"
- echo "adding $V, $F, $Fstd, $N to $FILE"
- echo -e "$V\t$F\t$Fstd\t$N" >> "$FILE"
+ 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 '^#')
-for FILE in v_dep_*
-do
- ./fit_data.py "$FILE" > "$FILE.fit"
-done
+cat > "$ASYSPLIT" <<HEREDOC
+import wtk_graph;
+
+size(15cm,10cm,IgnoreAspect);
+
+scale(Log, Linear);
+real xscale=1;
+real yscale=1;
+
+graphFile("loading-rate.d/loading_rate_131.98", xscale, yscale, phard, m8,
+ t=units("131.98","pN/nm"), dots=true);
+graphFile("loading-rate.d/loading_rate_24.33", xscale, yscale, red, m8,
+ t=units("24.33","pN/nm"), dots=true);
+
+xlimits(1,3e3);
+ylimits(90,620);
+
+label(sLabel("Loading rate dependence"), point(N),N);
+xaxis(sLabel("Loading rate (pN/s)"),BottomTop,LeftTicks);
+yaxis(sLabel("Unfolding force (pN)"),LeftRight,RightTicks);
+
+add(legend(),point(E),20E,UnFill);
+HEREDOC
-echo "set xlabel 'Pulling speed (nm/s)'
+cat > "GPSPLIT" <<HEREDOC
+set xlabel 'Pulling speed (nm/s)'
set ylabel 'Unfolding force (pN)'
set logscale x;
-plot $PLOTS" > "$GPSPLIT"
+plot $PLOTS
+HEREDOC