+++ /dev/null
-
-
-*******************************************************************************
-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
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']
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:
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);