From: W. Trevor King Date: Sat, 1 May 2010 20:29:06 +0000 (-0400) Subject: With the newer x/y column flexibility, remove fig3a-kx.data from king_vs_best X-Git-Tag: v1.0~381 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=520c6dd6401287bc7de9ed1b823b0e4d0c2e632e;p=thesis.git With the newer x/y column flexibility, remove fig3a-kx.data from king_vs_best Also: * added fitlines to that figure * removed some old cruft that should never have been versioned in the first place. --- diff --git a/tex/src/figures/fit-space/Best_2002_detailed_unfolding_pathway/fig3a.data b/tex/src/figures/fit-space/Best_2002_detailed_unfolding_pathway/fig3a.dat similarity index 100% rename from tex/src/figures/fit-space/Best_2002_detailed_unfolding_pathway/fig3a.data rename to tex/src/figures/fit-space/Best_2002_detailed_unfolding_pathway/fig3a.dat diff --git a/tex/src/figures/fit-space/Best_2002_detailed_unfolding_pathway/fig3a.data.loglog b/tex/src/figures/fit-space/Best_2002_detailed_unfolding_pathway/fig3a.data.loglog deleted file mode 100644 index d460f7f..0000000 --- a/tex/src/figures/fit-space/Best_2002_detailed_unfolding_pathway/fig3a.data.loglog +++ /dev/null @@ -1,18 +0,0 @@ -# Xp -> ((-9.30)-(-9.55))/(451-162)*(Xp-162) + (-9.55) -# Yp -> ((-3.5)-(-6.5))/(44-283)*(Yp-283) + (-6.5) --9.51107 -3.85146 --9.50329 -3.95188 --9.49723 -4.0272 --9.49204 -4.10251 --9.48599 -4.19038 --9.47907 -4.25314 --9.47388 -4.341 --9.46782 -4.41632 --9.46349 -4.47908 --9.45744 -4.55439 --9.45225 -4.65481 --9.44619 -4.73013 --9.44187 -4.80544 --9.43754 -4.8682 --9.43408 -4.91841 --9.42889 -4.99372 diff --git a/tex/src/figures/fit-space/Best_2002_detailed_unfolding_pathway/fit.log b/tex/src/figures/fit-space/Best_2002_detailed_unfolding_pathway/fit.log deleted file mode 100644 index 87289c9..0000000 --- a/tex/src/figures/fit-space/Best_2002_detailed_unfolding_pathway/fit.log +++ /dev/null @@ -1,328 +0,0 @@ - - -******************************************************************************* -Wed Nov 18 11:14:27 2009 - - -FIT: data read from 'fig3a.data' - #datapoints = 16 - residuals are weighted equally (unit weight) - -function used for fitting: f -fitted parameters initialized with current variable values - - - -******************************************************************************* -Wed Nov 18 11:14:31 2009 - - -FIT: data read from 'fig3a.data' - #datapoints = 16 - residuals are weighted equally (unit weight) - -function used for fitting: f(x) -fitted parameters initialized with current variable values - - - - Iteration 0 - WSSR : 1.44957e-05 delta(WSSR)/WSSR : 0 - delta(WSSR) : 0 limit for stopping : 1e-05 - lambda : 0.707107 - -initial set of free parameter values - -a = -1 -b = 0.001 - -After 3 iterations the fit converged. -final sum of squares of residuals : 2.32692e-08 -rel. change during last iteration : -5.57393e-08 - -degrees of freedom (FIT_NDF) : 14 -rms of residuals (FIT_STDFIT) = sqrt(WSSR/ndf) : 4.07687e-05 -variance of residuals (reduced chisquare) = WSSR/ndf : 1.66209e-09 - -Final set of parameters Asymptotic Standard Error -======================= ========================== - -a = -1 +/- 1.056e+10 (1.056e+12%) -b = 4.89334e-05 +/- 0.000177 (361.6%) - - -correlation matrix of the fit parameters: - - a b -a 1.000 -b -0.998 1.000 - - -******************************************************************************* -Wed Nov 18 11:15:16 2009 - - -FIT: data read from 'fig3a.data' - #datapoints = 16 - residuals are weighted equally (unit weight) - -function used for fitting: f(x) -fitted parameters initialized with current variable values - - - - Iteration 0 - WSSR : 1.51084e-06 delta(WSSR)/WSSR : 0 - delta(WSSR) : 0 limit for stopping : 1e-05 - lambda : 0.251924 - -initial set of free parameter values - -a = -3.0303e+09 -b = 0.001 - -After 3 iterations the fit converged. -final sum of squares of residuals : 1.99346e-08 -rel. change during last iteration : -6.7026e-09 - -degrees of freedom (FIT_NDF) : 14 -rms of residuals (FIT_STDFIT) = sqrt(WSSR/ndf) : 3.77346e-05 -variance of residuals (reduced chisquare) = WSSR/ndf : 1.4239e-09 - -Final set of parameters Asymptotic Standard Error -======================= ========================== - -a = -3.0303e+09 +/- 9.379e+09 (309.5%) -b = 0.0001432 +/- 0.0004564 (318.7%) - - -correlation matrix of the fit parameters: - - a b -a 1.000 -b -0.998 1.000 - - -******************************************************************************* -Wed Nov 18 11:15:54 2009 - - -FIT: data read from 'fig3a.data' - #datapoints = 16 - residuals are weighted equally (unit weight) - -function used for fitting: f(x) -fitted parameters initialized with current variable values - - - - Iteration 0 - WSSR : 1.99346e-08 delta(WSSR)/WSSR : 0 - delta(WSSR) : 0 limit for stopping : 1e-05 - lambda : 0.251924 - -initial set of free parameter values - -a = -3.0303e+09 -b = 0.0001432 - -After 1 iterations the fit converged. -final sum of squares of residuals : 1.99346e-08 -rel. change during last iteration : -1.65979e-16 - -degrees of freedom (FIT_NDF) : 14 -rms of residuals (FIT_STDFIT) = sqrt(WSSR/ndf) : 3.77346e-05 -variance of residuals (reduced chisquare) = WSSR/ndf : 1.4239e-09 - -Final set of parameters Asymptotic Standard Error -======================= ========================== - -a = -3.0303e+09 +/- 9.379e+09 (309.5%) -b = 0.0001432 +/- 0.0004564 (318.7%) - - -correlation matrix of the fit parameters: - - a b -a 1.000 -b -0.998 1.000 - - -******************************************************************************* -Wed Nov 18 11:18:01 2009 - - -FIT: data read from 'fig3a.data' - #datapoints = 16 - residuals are weighted equally (unit weight) - -function used for fitting: f(x) -fitted parameters initialized with current variable values - - - - Iteration 0 - WSSR : 7.20146e-09 delta(WSSR)/WSSR : 0 - delta(WSSR) : 0 limit for stopping : 1e-05 - lambda : 5.79664e-08 - -initial set of free parameter values - -a = -5e+10 -b = 1000 - -After 3 iterations the fit converged. -final sum of squares of residuals : 6.34822e-10 -rel. change during last iteration : -9.6167e-10 - -degrees of freedom (FIT_NDF) : 14 -rms of residuals (FIT_STDFIT) = sqrt(WSSR/ndf) : 6.73383e-06 -variance of residuals (reduced chisquare) = WSSR/ndf : 4.53445e-11 - -Final set of parameters Asymptotic Standard Error -======================= ========================== - -a = -5e+10 +/- 2.775e+09 (5.549%) -b = 752.873 +/- 656.4 (87.19%) - - -correlation matrix of the fit parameters: - - a b -a 1.000 -b -1.000 1.000 - - -******************************************************************************* -Wed Nov 18 11:18:13 2009 - - -FIT: data read from 'fig3a.data' - #datapoints = 16 - residuals are weighted equally (unit weight) - -function used for fitting: f(x) -fitted parameters initialized with current variable values - - - - Iteration 0 - WSSR : 6.34822e-10 delta(WSSR)/WSSR : 0 - delta(WSSR) : 0 limit for stopping : 1e-05 - lambda : 5.79664e-08 - -initial set of free parameter values - -a = -5e+10 -b = 752.873 - -After 1 iterations the fit converged. -final sum of squares of residuals : 6.34822e-10 -rel. change during last iteration : -9.93546e-15 - -degrees of freedom (FIT_NDF) : 14 -rms of residuals (FIT_STDFIT) = sqrt(WSSR/ndf) : 6.73383e-06 -variance of residuals (reduced chisquare) = WSSR/ndf : 4.53445e-11 - -Final set of parameters Asymptotic Standard Error -======================= ========================== - -a = -5e+10 +/- 2.775e+09 (5.549%) -b = 752.873 +/- 656.4 (87.19%) - - -correlation matrix of the fit parameters: - - a b -a 1.000 -b -1.000 1.000 - - -******************************************************************************* -Wed Nov 18 11:19:03 2009 - - -FIT: data read from 'fig3a.data' using ($1*1e9):2 - #datapoints = 16 - residuals are weighted equally (unit weight) - -function used for fitting: f(x) -fitted parameters initialized with current variable values - - - - Iteration 0 - WSSR : 6.34822e-10 delta(WSSR)/WSSR : 0 - delta(WSSR) : 0 limit for stopping : 1e-05 - lambda : 1.37136e-05 - -initial set of free parameter values - -a = -50 -b = 752.873 - -After 180 iterations the fit converged. -final sum of squares of residuals : 1.20387e-11 -rel. change during last iteration : -2.2071e-07 - -degrees of freedom (FIT_NDF) : 14 -rms of residuals (FIT_STDFIT) = sqrt(WSSR/ndf) : 9.27313e-07 -variance of residuals (reduced chisquare) = WSSR/ndf : 8.5991e-13 - -Final set of parameters Asymptotic Standard Error -======================= ========================== - -a = -40.7215 +/- 0.32 (0.7858%) -b = 39.727 +/- 4.029 (10.14%) - - -correlation matrix of the fit parameters: - - a b -a 1.000 -b -0.999 1.000 - - -******************************************************************************* -Wed Nov 18 11:24:01 2009 - - -FIT: data read from 'fig3a.data' using ($1*1e9):2 - #datapoints = 16 - residuals are weighted equally (unit weight) - -function used for fitting: f(x) -fitted parameters initialized with current variable values - - - - Iteration 0 - WSSR : 4.41799e-09 delta(WSSR)/WSSR : 0 - delta(WSSR) : 0 limit for stopping : 1e-05 - lambda : 1.76862e-05 - -initial set of free parameter values - -a = -40 -b = 40 - -After 5 iterations the fit converged. -final sum of squares of residuals : 1.20387e-11 -rel. change during last iteration : -5.91348e-07 - -degrees of freedom (FIT_NDF) : 14 -rms of residuals (FIT_STDFIT) = sqrt(WSSR/ndf) : 9.27313e-07 -variance of residuals (reduced chisquare) = WSSR/ndf : 8.5991e-13 - -Final set of parameters Asymptotic Standard Error -======================= ========================== - -a = -40.7215 +/- 0.32 (0.7858%) -b = 39.727 +/- 4.029 (10.14%) - - -correlation matrix of the fit parameters: - - a b -a 1.000 -b -0.999 1.000 diff --git a/tex/src/figures/fit-space/Best_2002_detailed_unfolding_pathway/king_sim-566.data b/tex/src/figures/fit-space/Best_2002_detailed_unfolding_pathway/king_sim-566.dat similarity index 100% rename from tex/src/figures/fit-space/Best_2002_detailed_unfolding_pathway/king_sim-566.data rename to tex/src/figures/fit-space/Best_2002_detailed_unfolding_pathway/king_sim-566.dat diff --git a/tex/src/figures/fit-space/SConscript b/tex/src/figures/fit-space/SConscript index 608882b..9937fb2 100644 --- a/tex/src/figures/fit-space/SConscript +++ b/tex/src/figures/fit-space/SConscript @@ -1,6 +1,6 @@ import os.path -from site_cons.site_init import link_wtk_graph +from site_cons.site_init import link_wtk_graph, link_pyfit FIGURES = ['king_vs_best', 'fit-valley'] #, 'mean_and_stdev'] @@ -13,18 +13,36 @@ data = File('data') king_vs_best_data = [] fit_valley = env.Command( - 'fit-valley.data', + 'fit-valley.dat', ['extract_fit_valley.py', data], 'python $SOURCES > $TARGET') king_vs_best_data.append(fit_valley) best_dir = Dir('Best_2002_detailed_unfolding_pathway') -best_valley = env.Command( - os.path.join(str(best_dir), 'fig3a-kx.data'), - [os.path.join(str(best_dir), 'fig3a.data')], - "grep -v '^#' $SOURCE | awk 'BEGIN{OFS=\"\t\"}{print $2, $1}' > $TARGET") +best_valley = File(os.path.join(str(best_dir), 'fig3a.dat')) king_vs_best_data.append(best_valley) +pyfit = link_pyfit(env) + +king_vs_best_fit_files = [] +for f in king_vs_best_data: + opts = '' + if f == best_valley: + opts = '-x 1 -y 0 ' + if hasattr(f, '__len__'): # fit_valley is an array, but best_valley is not + f = f[0] + fit = env.Command( + str(f)+'.fit', + [f, pyfit], + "python %s -m math:log -f 'A*log(x,10)+B' %s-v $SOURCE > $TARGET" + % (pyfit[0].get_abspath(), opts)) + fit_dat = env.Command( + str(fit[0])+'.dat', + fit, + "sed -n 's/^[A-Z]: //p' $SOURCE > $TARGET") + king_vs_best_fit_files.append(fit_dat) +king_vs_best_data += king_vs_best_fit_files + wtk_graph = link_wtk_graph(env) for fig in FIGURES: diff --git a/tex/src/figures/fit-space/king_vs_best.asy b/tex/src/figures/fit-space/king_vs_best.asy index 169a9c9..bc5e646 100644 --- a/tex/src/figures/fit-space/king_vs_best.asy +++ b/tex/src/figures/fit-space/king_vs_best.asy @@ -6,10 +6,23 @@ scale(Log, Linear); real xscale=1; real yscale=1; -graphFile("Best_2002_detailed_unfolding_pathway/fig3a-kx.data", xscale, yscale, psoft, m30, +/* f(x) = A + log10(x) + B */ +real fn_logxliny(real x, real[] params) { + return params[0] * log10(x) + params[1]; +} + +real xmin = 1.01457e-05; +real xmax = 0.10364; + +graphFile("Best_2002_detailed_unfolding_pathway/fig3a.dat", xcol=1, ycol=0, + xscale=xscale, yscale=yscale, p=psoft, mpath=m30, t="Best valley", dots=true); -graphFile("fit-valley.data", xscale, yscale, phard, m30, +graphFile("fit-valley.dat", xscale=xscale, yscale=yscale, p=phard, mpath=m30, t="King valley", dots=true); +fitFile("Best_2002_detailed_unfolding_pathway/fig3a.dat.fit.dat",f=fn_logxliny, + xmin=xmin, xmax=xmax, xscale=xscale, yscale=yscale, p=psoft); +fitFile("fit-valley.dat.fit.dat", f=fn_logxliny, + xmin=xmin, xmax=xmax, xscale=xscale, yscale=yscale, p=phard); label(sLabel(""), point(N), N); xaxis(sLabel("$k_{u0}$ ($1/$s)"), BottomTop, LeftTicks);