From: W. Trevor King Date: Sun, 17 Jun 2012 20:24:06 +0000 (-0400) Subject: Whitespace cleanups in the rest of the figures/*/*.asy files. X-Git-Tag: v1.0~339 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1b292aa13fe1c22b8b1f5d8586aa73ffe1e53cfb;p=thesis.git Whitespace cleanups in the rest of the figures/*/*.asy files. Used sed to replace tabs with spaces and strip trailing spaces. --- diff --git a/src/figures/asy/wtk_graph.asy b/src/figures/asy/wtk_graph.asy index e35a62e..64f4201 100644 --- a/src/figures/asy/wtk_graph.asy +++ b/src/figures/asy/wtk_graph.asy @@ -17,8 +17,8 @@ Label sLabel(string s, align align=NoAlign, int extra_spaces=0) { void graphData(picture pic=currentpicture, real[] x, real[] y, real xscale=1, real yscale=1, real dx=0, real dy=0, pen p=red, path mpath=scale(0.8mm)*unitcircle, - markroutine markroutine=marknodes, - string t="Title", + markroutine markroutine=marknodes, + string t="Title", bool dots=false) { pen pline=p; marker mk = nomarker; @@ -28,18 +28,18 @@ void graphData(picture pic=currentpicture, real[] x, real[] y, } if (t != "Title") { draw(pic=pic, graph(pic,xscale*(x+dx),yscale*(y+dy)), p=pline, - legend=sLabel(t,extra_spaces=1), marker=mk); + legend=sLabel(t,extra_spaces=1), marker=mk); } else { draw(pic=pic, graph(pic,xscale*(x+dx),yscale*(y+dy)), p=pline, marker=mk); } } void graphFile(picture pic=currentpicture, string file="datafile", - int xcol=0, int ycol=1, + int xcol=0, int ycol=1, real xscale=1, real yscale=1, real dx=0, real dy=0, pen p=red, path mpath=scale(0.8mm)*unitcircle, - markroutine markroutine=marknodes, - string t="Title", + markroutine markroutine=marknodes, + string t="Title", bool dots=false) { file fin = input(file).line(); real[][] a = fin.dimension(0,0); @@ -51,14 +51,14 @@ void graphFile(picture pic=currentpicture, string file="datafile", else x = sequence(y.length); graphData(pic=pic, x=x, y=y, xscale=xscale, yscale=yscale, dx=dx, dy=dy, p=p, - mpath=mpath, markroutine=markroutine, t=t, dots=dots); + mpath=mpath, markroutine=markroutine, t=t, dots=dots); } void fitFile(picture pic=currentpicture, string file="fitparamfile", - int pcol=0, real f(real x, real[] params), - real xmin=realMin, real xmax=realMax, - real xscale=1, real yscale=1, pen p=red, - string t="Title") { + int pcol=0, real f(real x, real[] params), + real xmin=realMin, real xmax=realMax, + real xscale=1, real yscale=1, pen p=red, + string t="Title") { file fin=input(file).line(); real[][] a=fin.dimension(0,0); a=transpose(a); @@ -74,17 +74,17 @@ void fitFile(picture pic=currentpicture, string file="fitparamfile", */ if (t != "Title") { draw(pic=pic, graph(pic, fn, a=xmin*xscale, b=xmax*xscale), p=p, - legend=sLabel(t,extra_spaces=1)); + legend=sLabel(t,extra_spaces=1)); } else { draw(pic=pic, graph(pic, fn, a=xmin*xscale, b=xmax*xscale), p=p); } } void histFile(picture pic=currentpicture, string file="datafile", - int bin_col=0, int count_col=1, + int bin_col=0, int count_col=1, real bin_scale=1, real count_scale=1, real low=-infinity, - pen fillpen=red, pen drawpen=nullpen, bool bars=false, - string t="Title") { + pen fillpen=red, pen drawpen=nullpen, bool bars=false, + string t="Title") { file fin = input(file).line(); real[][] a = fin.dimension(0,0); a = transpose(a); @@ -99,11 +99,11 @@ void histFile(picture pic=currentpicture, string file="datafile", count = count / total; if (t != "Title") { histogram(pic=pic, bins=bins, count=count, low=low, - fillpen=fillpen, drawpen=drawpen, bars=bars, - legend=sLabel(t,extra_spaces=1)); + fillpen=fillpen, drawpen=drawpen, bars=bars, + legend=sLabel(t,extra_spaces=1)); } else { histogram(pic=pic, bins=bins, count=count, low=low, - fillpen=fillpen, drawpen=drawpen, bars=bars); + fillpen=fillpen, drawpen=drawpen, bars=bars); } } @@ -135,10 +135,10 @@ real[][] extract_matrix(real[] xs, real[] ys, real[] zs) { for (i=0; i=0; --i) {/* count down so legend and plot orders match */ label = math("k="+units(format("%f",k[i]),"nN/nm")); // TODO: rainbow pen(N, i) graphSawtooth(file=file, k=k[i], xscale=xscale, fscale=fscale, - df=300e-12*i, p=psoft, t=label); + df=300e-12*i, p=psoft, t=label); } xlimits(0, 300e-9*xscale, crop=true); diff --git a/src/figures/order-dep/order-dep.asy b/src/figures/order-dep/order-dep.asy index a4958ec..6bf91f0 100644 --- a/src/figures/order-dep/order-dep.asy +++ b/src/figures/order-dep/order-dep.asy @@ -23,39 +23,39 @@ real kappa(real i, real Kc=Kc, real Kwlc=Kwlc) { } real theory(real i, int N, real Kc=Kc, real Kwlc=Kwlc, real ko=ko, real dx=dx, - real v=v, real T=T, real kB=kB, real g=g) { + real v=v, real T=T, real kB=kB, real g=g) { real f = kB*T/dx; return f*(log((kappa(i, Kc, Kwlc)*v)/((N-i)*ko*f)) - g); } // todo: colorpen(N,i) graphFile(pic, "data/order.avg-4", xcol=-1, ycol=0, - xscale=xscale, yscale=fscale, p=psoft, dots=true); + xscale=xscale, yscale=fscale, p=psoft, dots=true); graphFile(pic, "data/order.avg-8", xcol=-1, ycol=0, - xscale=xscale, yscale=fscale, p=pmed, dots=true); + xscale=xscale, yscale=fscale, p=pmed, dots=true); graphFile(pic, "data/order.avg-12", xcol=-1, ycol=0, - xscale=xscale, yscale=fscale, p=phard, dots=true); + xscale=xscale, yscale=fscale, p=phard, dots=true); graphFile(pic, "data/order.avg-16", xcol=-1, ycol=0, - xscale=xscale, yscale=fscale, p=black, dots=true); + xscale=xscale, yscale=fscale, p=black, dots=true); real fn(real x, real[] params) {return theory(i=x, N=4, Kwlc=params[0]);} fitFile(pic, "data/order.avg-4.fit.dat", f=fn, xmin=0, xmax=3, - xscale=xscale, yscale=fscale, p=psoft); + xscale=xscale, yscale=fscale, p=psoft); real fn(real x, real[] params) {return theory(i=x, N=8, Kwlc=params[0]);} fitFile(pic, "data/order.avg-8.fit.dat", f=fn, xmin=0, xmax=7, - xscale=xscale, yscale=fscale, p=pmed); + xscale=xscale, yscale=fscale, p=pmed); real fn(real x, real[] params) {return theory(i=x, N=12, Kwlc=params[0]);} fitFile(pic, "data/order.avg-12.fit.dat", f=fn, xmin=0, xmax=11, - xscale=xscale, yscale=fscale, p=phard); + xscale=xscale, yscale=fscale, p=phard); real fn(real x, real[] params) {return theory(i=x, N=16, Kwlc=params[0]);} fitFile(pic, "data/order.avg-16.fit.dat", f=fn, xmin=0, xmax=15, - xscale=xscale, yscale=fscale, p=black); + xscale=xscale, yscale=fscale, p=black); xaxis(pic, sLabel("Unfolding peak index $i=N_u$"), BottomTop, LeftTicks); yaxis(pic, sLabel("Force (pN)"), LeftRight, RightTicks); picture hist_picture(string datafile, - real xmin=-infinity, real xmax=infinity, - real ymin=-infinity, real ymax=infinity) { + real xmin=-infinity, real xmax=infinity, + real ymin=-infinity, real ymax=infinity) { picture pic; size(pic, 4cm, 3cm, IgnoreAspect); scale(pic, Linear, Log); diff --git a/src/figures/sim-sawtooth/sim-sawtooth.asy b/src/figures/sim-sawtooth/sim-sawtooth.asy index a75d84e..c1063af 100644 --- a/src/figures/sim-sawtooth/sim-sawtooth.asy +++ b/src/figures/sim-sawtooth/sim-sawtooth.asy @@ -8,9 +8,9 @@ real xscale=1e9; real fscale=1e12; void graphSawtooth(string file="datafile", real k, - int xcol=0, int fcol=1, - real xscale=1, real fscale=1, real dx=0, real df=0, - pen p=red) { + int xcol=0, int fcol=1, + real xscale=1, real fscale=1, real dx=0, real df=0, + pen p=red) { file fin=input(file).line(); real[][] a=fin.dimension(0,0); a=transpose(a); @@ -18,14 +18,14 @@ void graphSawtooth(string file="datafile", real k, real[] f=a[fcol]; x = x - f/k; /* Remove cantilever extension */ graphData(x=x, y=f, xscale=xscale, yscale=fscale, - dx=dx, dy=df, p=p, dots=false); + dx=dx, dy=df, p=p, dots=false); } graphSawtooth("fig1.dat", k=k, xscale=xscale, fscale=fscale, p=psoft); graphSawtooth("fig2.dat", k=k, xscale=xscale, fscale=fscale, - df=200e-12, p=pmed); + df=200e-12, p=pmed); graphSawtooth("fig3.dat", k=k, xscale=xscale, fscale=fscale, - df=400e-12, p=phard); + df=400e-12, p=phard); xaxis(sLabel("Distance (nm)"), BottomTop, LeftTicks); yaxis(sLabel("Force (pN)"), LeftRight, RightTicks); diff --git a/src/figures/v-dep/v-dep-sd.asy b/src/figures/v-dep/v-dep-sd.asy index 0a9851d..5de276e 100644 --- a/src/figures/v-dep/v-dep-sd.asy +++ b/src/figures/v-dep/v-dep-sd.asy @@ -21,20 +21,20 @@ string kx_title(string kval, string kexp, string xval) { } graphFile(pic, "v_dep-5e-5_0.1e-9/v_dep", ycol=2, - xscale=xscale, yscale=yscale, p=psoft, - t=kx_title(kval="5", kexp="-5", xval="0.100"), dots=true); + xscale=xscale, yscale=yscale, p=psoft, + t=kx_title(kval="5", kexp="-5", xval="0.100"), dots=true); graphFile(pic, "v_dep-1e-5_0.225e-9/v_dep", ycol=2, - xscale=xscale, yscale=yscale, p=pmed, - t=kx_title(kval="1", kexp="-5", xval="0.225"), dots=true); + xscale=xscale, yscale=yscale, p=pmed, + t=kx_title(kval="1", kexp="-5", xval="0.225"), dots=true); graphFile(pic, "v_dep-5e-5_0.225e-9/v_dep", ycol=2, - xscale=xscale, yscale=yscale, p=phard, - t=kx_title(kval="5", kexp="-5", xval="0.225"), dots=true); + xscale=xscale, yscale=yscale, p=phard, + t=kx_title(kval="5", kexp="-5", xval="0.225"), dots=true); fitFile(pic, "v_dep-5e-5_0.1e-9/v_dep-sd.fit.dat", f=fn_logxliny, - xmin=1e-9, xmax=1e-5, xscale=xscale, yscale=yscale, p=psoft); + xmin=1e-9, xmax=1e-5, xscale=xscale, yscale=yscale, p=psoft); fitFile(pic, "v_dep-1e-5_0.225e-9/v_dep-sd.fit.dat", f=fn_logxliny, - xmin=1e-9, xmax=1e-5, xscale=xscale, yscale=yscale, p=pmed); + xmin=1e-9, xmax=1e-5, xscale=xscale, yscale=yscale, p=pmed); fitFile(pic, "v_dep-5e-5_0.225e-9/v_dep-sd.fit.dat", f=fn_logxliny, - xmin=1e-9, xmax=1e-5, xscale=xscale, yscale=yscale, p=phard); + xmin=1e-9, xmax=1e-5, xscale=xscale, yscale=yscale, p=phard); xequals(pic, x=1e-6*xscale, p=dashed); xaxis(pic, sLabel("Pulling speed (nm/s)"), BottomTop, LeftTicks); @@ -42,8 +42,8 @@ yaxis(pic, sLabel("Unfolding force (pN)"), LeftRight, RightTicks); add(pic, legend(pic), point(pic, E), 20E, UnFill); picture hist_picture(string datafile, - real xmin=-infinity, real xmax=infinity, - real ymin=-infinity, real ymax=infinity) { + real xmin=-infinity, real xmax=infinity, + real ymin=-infinity, real ymax=infinity) { picture pic; size(pic, 4cm, 3cm, IgnoreAspect); scale(pic, Linear, Log); diff --git a/src/figures/v-dep/v-dep.asy b/src/figures/v-dep/v-dep.asy index e5a2a4d..a91fc1d 100644 --- a/src/figures/v-dep/v-dep.asy +++ b/src/figures/v-dep/v-dep.asy @@ -18,17 +18,17 @@ string kx_title(string kval, string kexp, string xval) { graphFile("v_dep-5e-5_0.1e-9/v_dep", xscale=xscale, yscale=yscale, p=psoft, - t=kx_title(kval="5", kexp="-5", xval="0.100"), dots=true); + t=kx_title(kval="5", kexp="-5", xval="0.100"), dots=true); graphFile("v_dep-1e-5_0.225e-9/v_dep", xscale=xscale, yscale=yscale, p=pmed, - t=kx_title(kval="1", kexp="-5", xval="0.225"), dots=true); + t=kx_title(kval="1", kexp="-5", xval="0.225"), dots=true); graphFile("v_dep-5e-5_0.225e-9/v_dep", xscale=xscale, yscale=yscale, p=phard, - t=kx_title(kval="5", kexp="-5", xval="0.225"), dots=true); + t=kx_title(kval="5", kexp="-5", xval="0.225"), dots=true); fitFile("v_dep-5e-5_0.1e-9/v_dep.fit.dat", f=fn_logxliny, - xmin=1e-9, xmax=1e-5, xscale=xscale, yscale=yscale, p=psoft); + xmin=1e-9, xmax=1e-5, xscale=xscale, yscale=yscale, p=psoft); fitFile("v_dep-1e-5_0.225e-9/v_dep.fit.dat", f=fn_logxliny, - xmin=1e-9, xmax=1e-5, xscale=xscale, yscale=yscale, p=pmed); + xmin=1e-9, xmax=1e-5, xscale=xscale, yscale=yscale, p=pmed); fitFile("v_dep-5e-5_0.225e-9/v_dep.fit.dat", f=fn_logxliny, - xmin=1e-9, xmax=1e-5, xscale=xscale, yscale=yscale, p=phard); + xmin=1e-9, xmax=1e-5, xscale=xscale, yscale=yscale, p=phard); xequals(x=1e-6*xscale, p=dashed); label(sLabel("Pulling speed dependence"), point(N), N);