Hi Troels, I would like to extend on this idea of a synthetic data set: On 25 August 2014 19:15, Edward d'Auvergne <edward@xxxxxxxxxxxxx> wrote:
Hi, Maybe to help work out what is happing both in Scipy and in relax, a simple test data set could be created. For example if you set I0 to 1000, R to 1, and then pick the time points 0, 1, 2, 3, 4, you would then have the intensity data: 0 1000.0 1 367.879441171 2 135.335283237 3 49.7870683679 4 18.3156388887 It might take some Bootstrapping simulations to obtain intensity errors. Just randomise I0 and R with a Gaussian distribution a large number of times, then work out the intensity SD values for each time point. Then you could pass the data and errors into the Scipy and relax code paths and see what you get for a covariance matrix. That might show if the double R2eff error is a bug or a failure of the covariance matrix error estimate. As it is synthetic data, you will know the exact parameter values. And you will know the exact error values to search for in the covariance matrix.
This would really help you in understanding and debugging the problem, if you were to create it. Such data sets was how I implemented the model-free analysis originally in relax. With this data set, you can directly calculate the numeric values of the elements of the Jacobian, the chi-squared gradient, the chi-squared Hessian, and the covariance matrix. And this can be done both at the minimum where the gradient should be zero (and the Hessian quadratic) but also as some {Rx, I0} point in the space away from the minimum. If you know the numeric value of all elements, implementing and debugging is incredibly simple! There is another way which uses only the original exponential equation and that is to use the Scipy QUADPACK interface to numerically integrate the equation to estimate both the chi-squared gradient and Hessian (the Jacobian and covariance matrix numeric values cannot be found this way). But this is much more complicated than calculating it by hand. Unfortunately my hand calculated gradients and Hessian values no longer exist, so cannot be used as a reference. Gary Thompson, and Chris MacRaild, created the relax test suite a number of years after I implemented the model-free, exponential curve-fitting and NOE analyses. Regards, Edward