Author: bugman Date: Mon Sep 1 15:12:28 2014 New Revision: 25503 URL: http://svn.gna.org/viewcvs/relax?rev=25503&view=rev Log: Merged revisions 25418-25498 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ................ r25418 | tlinnet | 2014-08-29 10:52:51 +0200 (Fri, 29 Aug 2014) | 9 lines Added Relax Error, if less than 2 time points is used for exponential curve fitting in R2eff. This follows: http://thread.gmane.org/gmane.science.nmr.relax.user/1718 http://thread.gmane.org/gmane.science.nmr.relax.user/1735 Specifically, data was attached here: http://thread.gmane.org/gmane.science.nmr.relax.user/1735/focus=1736 ................ r25419 | tlinnet | 2014-08-29 10:52:53 +0200 (Fri, 29 Aug 2014) | 9 lines Added systemtest Relax_disp.test_bug_atul_srivastava(), to cathch a bug missing raising a Relax Error, since the setup points to a situation where the data shows it is exponential fitting, but only one time point is added per file. This follows: http://thread.gmane.org/gmane.science.nmr.relax.user/1718 http://thread.gmane.org/gmane.science.nmr.relax.user/1735 Specifically, data was attached here: http://thread.gmane.org/gmane.science.nmr.relax.user/1735/focus=1736 ................ r25420 | tlinnet | 2014-08-29 11:05:54 +0200 (Fri, 29 Aug 2014) | 5 lines Parameter precision lowered for Relax_disp.test_estimate_r2eff_err_auto(). This is due to change to C-code. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25421 | bugman | 2014-08-29 11:34:54 +0200 (Fri, 29 Aug 2014) | 6 lines Created the select.display user function. This simply displays the current spin selections of all spins. In the future it can be extended to display the interatomic data container selections, domain selections, etc. ................ r25422 | tlinnet | 2014-08-29 11:50:20 +0200 (Fri, 29 Aug 2014) | 8 lines Fix for systemtest: test_estimate_r2eff_err_auto() The Jacobian to estimate the errors has been changed from the direct function Jacobian, to the Jacobian of the chi2 function. This changes the R2eff error predictions, and hence parameter fitting. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25423 | tlinnet | 2014-08-29 11:50:23 +0200 (Fri, 29 Aug 2014) | 3 lines Implemented the direct Jacobian in Python, to be independent of C-code in development fase. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25424 | tlinnet | 2014-08-29 11:50:26 +0200 (Fri, 29 Aug 2014) | 5 lines Activated all method try in: systemtest Relax_disp.test_estimate_r2eff_err_methods. This is to fast estimate errors from all different methods. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25425 | tlinnet | 2014-08-29 11:51:33 +0200 (Fri, 29 Aug 2014) | 3 lines Fix to systemtest: test_estimate_r2eff_err_auto, which now checks the values for the direct Jacobian. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25426 | tlinnet | 2014-08-29 12:10:17 +0200 (Fri, 29 Aug 2014) | 1 line Increased the number of time points for exponential curve fitting to 3. ................ r25427 | tlinnet | 2014-08-29 12:40:03 +0200 (Fri, 29 Aug 2014) | 3 lines Fix to weight properly according to if minimising with direct Jacobian or chi2 Jacobian. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25428 | tlinnet | 2014-08-29 12:40:05 +0200 (Fri, 29 Aug 2014) | 3 lines Fix to systemtest test_estimate_r2eff_err_methods, after modification of weighting. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25429 | tlinnet | 2014-08-29 12:40:07 +0200 (Fri, 29 Aug 2014) | 3 lines Swithced in estimate_r2eff_err() to use the chi2 Jacobian from C code, and Jacobian from python code. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25430 | tlinnet | 2014-08-29 12:45:07 +0200 (Fri, 29 Aug 2014) | 3 lines Removed all references to test values which was received by wrong weighting. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25431 | bugman | 2014-08-29 14:53:37 +0200 (Fri, 29 Aug 2014) | 5 lines Better error checking in the relaxation dispersion overfit_deselect() API method. The model must be set for this procedure to work, and the method now checks that this is the case. ................ r25432 | bugman | 2014-08-29 14:57:38 +0200 (Fri, 29 Aug 2014) | 6 lines Better error checking for the specific_analyses.relax_disp.average_intensity() function. This function would fail with a traceback if a peak intensity error analysis had not yet been performed. Now it fails instead with a clean RelaxError so that the user knows what is wrong. ................ r25433 | tlinnet | 2014-08-29 15:09:12 +0200 (Fri, 29 Aug 2014) | 5 lines Tried implementing getting the chi2 gradient, using target_function.chi2.dchi2(). The output seem equal. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25434 | tlinnet | 2014-08-29 15:17:05 +0200 (Fri, 29 Aug 2014) | 9 lines Replaced the way to calculate the chi2 Jacobian, for exponential fit in minfx. This is only for the test class, but reuses library code. This should make it much easier in the future to implement chi2 gradient functions to minfx, since it is only necessary to implement the direct gradient of the function, and then pass the direct gradient to chi2 library, which turn it into the chi2 gradient function which minfx use. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25435 | tlinnet | 2014-08-29 15:40:35 +0200 (Fri, 29 Aug 2014) | 3 lines Moved unnessary function in R2eff error estimate module into experimental class. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25436 | tlinnet | 2014-08-29 16:02:33 +0200 (Fri, 29 Aug 2014) | 5 lines Implemented systemtest: test_bug_negative_intensities_cpmg, to show lack of error message to user. Maybe these spins should be de-selected, or at least show a better warning. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25437 | bugman | 2014-08-29 16:07:40 +0200 (Fri, 29 Aug 2014) | 10 lines An attempt at documenting the Monte Carlo simulation verses covariance matrix error estimates. This is for the R2eff and I0 parameters of the exponential curves. For the Monte Carlo errors, 10000 simulations were preformed. This means that these errors can perform as a gold standard by which to judge the covariance matrix technique. Currently it can be seen that the relax_disp.r2eff_err_estimate user function with the chi2_jacobian flag set to True performs extremely poorly. ................ r25438 | bugman | 2014-08-29 16:20:44 +0200 (Fri, 29 Aug 2014) | 7 lines Reintroduced the original target_functions.relax_fit.jacobian() function. The new function for the Jacobian of the chi-squared function has been renamed to target_functions.relax_fit.jacobian_chi2() so that both Python functions are accessible within the C module. ................ r25439 | bugman | 2014-08-29 16:25:27 +0200 (Fri, 29 Aug 2014) | 3 lines Epydoc fixes for the pipe_control.mol_res_spin.format_info_full() function. ................ r25440 | bugman | 2014-08-29 16:28:57 +0200 (Fri, 29 Aug 2014) | 3 lines Epydoc docstring fixes for many methods in the relaxation dispersion auto-analysis module. ................ r25441 | tlinnet | 2014-08-29 16:39:18 +0200 (Fri, 29 Aug 2014) | 3 lines If math domain errors are found when calculating the the two point R2eff values, the point is being skipped. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25442 | tlinnet | 2014-08-29 16:39:23 +0200 (Fri, 29 Aug 2014) | 1 line Moved intensity negative value from reference to CPMG point. ................ r25443 | tlinnet | 2014-08-29 16:39:24 +0200 (Fri, 29 Aug 2014) | 3 lines Modified systemtest test_bug_negative_intensities_cpmg, to prepare for testing number of R2eff points. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25444 | bugman | 2014-08-29 16:59:22 +0200 (Fri, 29 Aug 2014) | 10 lines Comparison of 10,000 Monte Carlo simulations to a different covariance matrix error estimate. The covariance_matrix.py script has been duplicated and the chi2_jacobian argument of the relax_disp.r2eff_err_estimate user function has been changed from True to False. As can be seen in the 2D Grace plots, this error estimate is incredibly different. The R2eff errors are overestimated by a factor of 1.9555, which indicates that the Jacobian or covariance matrix formula are not yet correct. ................ r25445 | bugman | 2014-08-29 17:36:01 +0200 (Fri, 29 Aug 2014) | 5 lines The target_functions.relax_fit C module Python function jacobian_chi2() is now exposed. This was previously not visible from within Python. ................ r25446 | bugman | 2014-08-29 18:05:20 +0200 (Fri, 29 Aug 2014) | 8 lines Added a script and log file for calculating the numerical Jacobian for an exponential curve. This uses the data at http://thread.gmane.org/gmane.science.nmr.relax.devel/6807/focus=6840 and calculates the Jacobian using the numdifftools.Jacobian object construct and obtain the matrix, both at the minimum and at a point away from the minimum. The values will be used to construct a unit test to check the C module implementation. ................ r25447 | bugman | 2014-08-29 18:06:27 +0200 (Fri, 29 Aug 2014) | 3 lines Added the log file which should have been committed in the last revision. ................ r25448 | bugman | 2014-08-29 18:18:40 +0200 (Fri, 29 Aug 2014) | 6 lines Created two unit tests showing the target_functions.relax_fit.jacobian() function is correct. This compares the calculated Jacobian to the numerically integrated values from the test_suite/shared_data/curve_fitting/numeric_gradient/jacobian.py script. ................ r25449 | bugman | 2014-08-29 18:20:33 +0200 (Fri, 29 Aug 2014) | 6 lines Renamed the test_data/shared_data/curve_fitting/numeric_gradient/ directory to numeric_topology. This is to better reflect that it contains numeric approximations to the gradient, Hessian, and Jacobian. ................ r25450 | bugman | 2014-08-29 18:24:14 +0200 (Fri, 29 Aug 2014) | 8 lines Added a script and log for calculating the numerical chi-squared Jacobian for an exponential curve. This uses the data at http://thread.gmane.org/gmane.science.nmr.relax.devel/6807/focus=6840 and calculates the chi-squared Jacobian using the numdifftools.Jacobian object construct and obtain the matrix, both at the minimum and at a point away from the minimum. The values will be used to construct a unit test to check the C module implementation. ................ r25451 | bugman | 2014-08-29 18:36:45 +0200 (Fri, 29 Aug 2014) | 6 lines Fix for the chi-squared Jacobian numerical approximation script. The function was modified to that a list of chi-squared elements are returned, i.e. the sum part of the chi-squared equation has been removed. ................ r25452 | bugman | 2014-08-29 18:37:55 +0200 (Fri, 29 Aug 2014) | 6 lines Created two unit tests showing the target_functions.relax_fit.jacobian_chi2() function is correct. This compares the calculated chi-squared Jacobian to the numerically integrated values from the test_suite/shared_data/curve_fitting/numeric_topology/jacobian_chi2.py script. ................ r25453 | bugman | 2014-08-29 20:18:55 +0200 (Fri, 29 Aug 2014) | 8 lines Added a script and log for calculating the numerical covariance matrix for an exponential curve. This uses the data at http://thread.gmane.org/gmane.science.nmr.relax.devel/6807/focus=6840 and calculates the covariance matrix via the Jacobian calculated using the numdifftools.Jacobian object construct and obtain the matrix, both at the minimum and at a point away from the minimum. The covariance is calculated as inv(J^T.W.J). ................ r25454 | bugman | 2014-08-29 20:45:14 +0200 (Fri, 29 Aug 2014) | 8 lines Added a script and log for calculating the exponential curve parameter errors via bootstrapping. This uses the data at http://thread.gmane.org/gmane.science.nmr.relax.devel/6807/focus=6840 and calculates the parameter errors via bootstrapping. As the parameters at the minimum are the exact parameter values, bootstrapping and Monte Carlo simulation converge and hence this is a true error estimate. 200,000 simulations where used, so the parameter errors are extremely accurate. ................ r25455 | tlinnet | 2014-08-29 21:52:22 +0200 (Fri, 29 Aug 2014) | 3 lines Modified module to estimate R2eff errors, to use the C-code Jacobian. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25456 | tlinnet | 2014-08-29 21:52:24 +0200 (Fri, 29 Aug 2014) | 3 lines Modified systemtest test_estimate_r2eff_err_methods, to check all Jacobian methods are correctly implemented. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25457 | tlinnet | 2014-08-29 22:11:40 +0200 (Fri, 29 Aug 2014) | 3 lines Added more print out information, when log(I / I_ref) is negative, and raising errors. This can help the user track back information to the error more easily. ................ r25458 | tlinnet | 2014-08-29 22:11:41 +0200 (Fri, 29 Aug 2014) | 6 lines Improved systemtest test_bug_negative_intensities_cpmg, by counting number of R2eff points. Spin 4, which has one negative intensity, is expected to have one less R2eff point. This makes sure, that all CPMG data set can be loaded and analysed, even if some peaks are very weak are fluctuating with error level. ................ r25459 | tlinnet | 2014-08-29 23:12:11 +0200 (Fri, 29 Aug 2014) | 3 lines Fix for also storing 'r1_fit' to cdp even though it is set to False. bug #22541(https://gna.org/bugs/?22541): The R1 fit flag does not work in the GUI. ................ r25460 | tlinnet | 2014-08-29 23:12:12 +0200 (Fri, 29 Aug 2014) | 5 lines Clean-up in gui-test Relax_disp.test_r2eff_err_estimate. This now passes after previous commit. bug #22541(https://gna.org/bugs/?22541): The R1 fit flag does not work in the GUI. ................ r25461 | tlinnet | 2014-08-29 23:12:14 +0200 (Fri, 29 Aug 2014) | 5 lines Added model DPL94, to be tested in gui-test Relax_disp.test_r2eff_err_estimate. This shows that the bug is still there. bug #22541(https://gna.org/bugs/?22541): The R1 fit flag does not work in the GUI. ................ r25462 | tlinnet | 2014-08-29 23:12:16 +0200 (Fri, 29 Aug 2014) | 3 lines Fix for systemtest test_estimate_r2eff_err and test_r1rho_kjaergaard_missing_r1, where r1_fit=True, needed to be send to Auto_analyses. bug #22541(https://gna.org/bugs/?22541): The R1 fit flag does not work in the GUI. ................ r25463 | tlinnet | 2014-08-30 00:00:45 +0200 (Sat, 30 Aug 2014) | 3 lines Fix for 'r1' not being added to parameters, when looking up model in dictionary. bug #22541(https://gna.org/bugs/?22541): The R1 fit flag does not work in the GUI. ................ r25464 | tlinnet | 2014-08-30 00:22:54 +0200 (Sat, 30 Aug 2014) | 1 line API documentation fixes. ................ r25465 | tlinnet | 2014-08-30 01:03:30 +0200 (Sat, 30 Aug 2014) | 3 lines Moved multifit_covar into lib.statistics, since it is an independent module. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25466 | tlinnet | 2014-08-30 01:03:32 +0200 (Sat, 30 Aug 2014) | 3 lines Moved "func_exp_grad" into experimental class for different minimisation methods. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25467 | tlinnet | 2014-08-30 01:03:34 +0200 (Sat, 30 Aug 2014) | 5 lines Improved documentation to user function relax_disp.r2eff_err_estimate, and removed the possibility to use the chi2 Jacobian, as this is rubbish. But the back-end still have this possibility, should one desire to try this. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25468 | tlinnet | 2014-08-30 01:03:36 +0200 (Sat, 30 Aug 2014) | 5 lines Moved the argument 'chi2_jacobian' as the last argument in estimate_r2eff_err. This argument is highly likely not to be used, but is kept for future testing purposes. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25469 | tlinnet | 2014-08-30 01:05:44 +0200 (Sat, 30 Aug 2014) | 3 lines Fix to eksperimental class for fitting with different methods. After moving the funciont into class, 'self' should be added to the funcion. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25470 | tlinnet | 2014-08-30 01:08:01 +0200 (Sat, 30 Aug 2014) | 3 lines Fix to systemtest test_estimate_r2eff_err, after removing the possibility to use the chi2 Jacobian. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25471 | tlinnet | 2014-08-30 01:10:07 +0200 (Sat, 30 Aug 2014) | 3 lines Fix for systemtest test_estimate_r2eff_err_methods. The function was called wrong in experimental class. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. ................ r25472 | tlinnet | 2014-08-30 18:06:00 +0200 (Sat, 30 Aug 2014) | 3 lines [... 378 lines stripped ...]