Author: bugman Date: Thu May 1 17:32:50 2008 New Revision: 6052 URL: http://svn.gna.org/viewcvs/relax?rev=6052&view=rev Log: A few more updates to the development chapter for the new design. Modified: 1.3/docs/latex/develop.tex Modified: 1.3/docs/latex/develop.tex URL: http://svn.gna.org/viewcvs/relax/1.3/docs/latex/develop.tex?rev=6052&r1=6051&r2=6052&view=diff ============================================================================== --- 1.3/docs/latex/develop.tex (original) +++ 1.3/docs/latex/develop.tex Thu May 1 17:32:50 2008 @@ -91,19 +91,25 @@ \begin{footnotesize} \begin{verbatim} - def aic(self, chi2, k, n): - """Akaike's Information Criteria (AIC). - - The formula is: - - AIC = chi2 + 2k - - where: - chi2 is the minimised chi-squared value. - k is the number of parameters in the model. - """ - - return chi2 + 2.0*k +def aic(chi2, k, n): + """Akaike's Information Criteria (AIC). + + The formula is:: + + AIC = chi2 + 2k + + + @param chi2: The minimised chi-squared value. + @type chi2: float + @param k: The number of parameters in the model. + @type k: int + @param n: The dimension of the relaxation data set. + @type n: int + @return: The AIC value. + @rtype: float + """ + + return chi2 + 2.0*k \end{verbatim} \end{footnotesize} @@ -169,11 +175,23 @@ \begin{footnotesize} \begin{verbatim} -class Model_free(Common_functions): - def __init__(self, relax): - """Class containing functions specific to model-free analysis.""" - - self.relax = relax +class Model_free_main: + """Class containing functions specific to model-free analysis.""" + + def are_mf_params_set(self, spin): + """Test if the model-free parameter values are set. + + @param spin: The spin container object. + @type spin: SpinContainer instance + @return: The name of the first parameter in the parameter list in which the + corresponding parameter value is None. If all parameters are set, then None + is returned. + @rtype: str or None + """ + + # Deselected residue. + if spin.select == 0: + return \end{verbatim} \end{footnotesize} @@ -195,7 +213,7 @@ \item Trailing whitespace should be avoided, although this is not very important. \item All functions should be preceded by two empty lines. The only exception is the first function of the class definition. \item Function arguments should be separated by a comma followed by a single space. -\item The assignment operator should be surrounded by spaces, for example `\verb*|self.relax = relax|'. The exception is function arguments where for example `\verb*|self.classic_colour(res_num=None, width=0.3)|'. +\item The assignment operator should be surrounded by spaces, for example `\verb*|tm = 1e-8|'. The exception is function arguments where for example `\verb*|self.classic_colour(res_num=None, width=0.3)|'. \item The comparison operators should also be surrounded by spaces, e.g.\ `\verb*| < |', `\verb*| > |', `\verb*| == |', `\verb*| <= |', `\verb*| => |', `\verb*| <> |', `\verb*| != |', `\verb*| is |', and `\verb*| in |'. \end{itemize}