Package functions :: Module chi2 :: Class chi2
[hide private]
[frames] | no frames]

Class chi2

source code


Instance Methods [hide private]
 
__init__(self)
Function to calculate the chi-squared value.
source code
 
chi2(self, params, diff_type, diff_params, model, relax_data, errors, print_flag=0)
Function to calculate the chi-squared value.
source code
Method Details [hide private]

chi2(self, params, diff_type, diff_params, model, relax_data, errors, print_flag=0)

source code 
Function to calculate the chi-squared value.

Function arguments
~~~~~~~~~~~~~~~~~~

1:  params - a list containing the parameter values specific for the given model.
The order of parameters must be as follows:
        m1 - {S2}
        m2 - {S2, te}
        m3 - {S2, Rex}
        m4 - {S2, te, Rex}
        m5 - {S2f, S2s, ts}
2:  diff_type - string.  The diffusion tensor, ie 'iso', 'axial', 'aniso'
3:  diff_params - array.  An array with the diffusion parameters
4:  model - string.  The model
5:  relax_data - array.  An array containing the experimental relaxation values.
6:  errors - array.  An array containing the experimental errors.


The chi-sqared equation
~~~~~~~~~~~~~~~~~~~~~~~

Data structure:  self.data.chi2
Type:  Double precision floating point value.
Dependencies:  self.data.ri
Required by:  None


Formula
~~~~~~~
        _n_
        \    (Ri - Ri()) ** 2
Chi2  =  >   ----------------
        /__    sigma_i ** 2
        i=1

where:
        Ri are the values of the measured relaxation data set.
        Ri() are the values of the back calculated relaxation data set.
        sigma_i are the values of the error set.

Returned is the chi-squared value.