Author: bugman Date: Tue May 20 16:17:15 2008 New Revision: 6166 URL: http://svn.gna.org/viewcvs/relax?rev=6166&view=rev Log: Fixed all the function docstrings to be valid epytext. Modified: 1.3/maths_fns/chi2.py Modified: 1.3/maths_fns/chi2.py URL: http://svn.gna.org/viewcvs/relax/1.3/maths_fns/chi2.py?rev=6166&r1=6165&r2=6166&view=diff ============================================================================== --- 1.3/maths_fns/chi2.py (original) +++ 1.3/maths_fns/chi2.py Tue May 20 16:17:15 2008 @@ -33,20 +33,22 @@ def chi2(data, back_calc_vals, errors): """Function to calculate the chi-squared value. - The chi-sqared equation - ======================= + The chi-squared equation + ======================== - _n_ - \ (yi - yi(theta)) ** 2 - chi^2(theta) = > --------------------- - /__ sigma_i ** 2 - i=1 + The equation is:: - where: - theta is the parameter vector. - yi are the values of the measured data set. - yi(theta) are the values of the back calculated data set. - sigma_i are the values of the error set. + _n_ + \ (yi - yi(theta)) ** 2 + chi^2(theta) = > --------------------- + /__ sigma_i ** 2 + i=1 + + where + - theta is the parameter vector. + - yi are the values of the measured data set. + - yi(theta) are the values of the back calculated data set. + - sigma_i are the values of the error set. @param data: The vector of yi values. @@ -70,21 +72,23 @@ def dchi2(data, back_calc_vals, back_calc_grad, errors): """Function to create the chi-squared gradient. - The chi-sqared gradient - ======================= + The chi-squared gradient + ======================== - _n_ - dchi^2(theta) \ / yi - yi(theta) dyi(theta) \ - ------------- = -2 > | -------------- . ---------- | - dthetaj /__ \ sigma_i**2 dthetaj / - i=1 + The equation is:: - where: - theta is the parameter vector. - yi are the values of the measured data set. - yi(theta) are the values of the back calculated data set. - dyi(theta)/dthetaj are the values of the back calculated gradient. - sigma_i are the values of the error set. + _n_ + dchi^2(theta) \ / yi - yi(theta) dyi(theta) \ + ------------- = -2 > | -------------- . ---------- | + dthetaj /__ \ sigma_i**2 dthetaj / + i=1 + + where + - theta is the parameter vector. + - yi are the values of the measured data set. + - yi(theta) are the values of the back calculated data set. + - dyi(theta)/dthetaj are the values of the back calculated gradient. + - sigma_i are the values of the error set. @param data: The vector of yi values. @type data: numpy array @@ -112,19 +116,21 @@ The chi-squared Hessian ======================= - _n_ - d2chi^2(theta) \ 1 / dyi(theta) dyi(theta) d2yi(theta) \ - --------------- = 2 > ---------- | ---------- . ---------- - (yi-yi(theta)) . --------------- | - dthetaj.dthetak /__ sigma_i**2 \ dthetaj dthetak dthetaj.dthetak / - i=1 + The equation is:: - where: - theta is the parameter vector. - yi are the values of the measured relaxation data set. - yi(theta) are the values of the back calculated relaxation data set. - dyi(theta)/dthetaj are the values of the back calculated gradient. - d2yi(theta)/dthetaj.dthetak are the values of the back calculated Hessian. - sigma_i are the values of the error set. + _n_ + d2chi^2(theta) \ 1 / dyi(theta) dyi(theta) d2yi(theta) \ + --------------- = 2 > ---------- | ---------- . ---------- - (yi-yi(theta)) . --------------- | + dthetaj.dthetak /__ sigma_i**2 \ dthetaj dthetak dthetaj.dthetak / + i=1 + + where + - theta is the parameter vector. + - yi are the values of the measured relaxation data set. + - yi(theta) are the values of the back calculated relaxation data set. + - dyi(theta)/dthetaj are the values of the back calculated gradient. + - d2yi(theta)/dthetaj.dthetak are the values of the back calculated Hessian. + - sigma_i are the values of the error set. @param data: The vector of yi values.