Open main menu

Changes

Relax 3.3.0

114 bytes added, 06:47, 8 September 2014
m
no edit summary
* Expanded the minimise.grid_zoom user function documentation. A few sentences about the limitations of the algorithm have been added.
* Completed the Relax_fit.test_zooming_grid_search system test. Now only a single spin is optimised. The zooming levels increase in integer increments from 0 to 50 so that the final zoomed grid is insanely small (as the curve-fitting C modules are incredibly fast, this test is nevertheless relatively quick). The final zooming grid search parameter values are checked to see if they are the same as those optimised in the Relax_fit.test_curve_fitting_height system test to demonstrate the success of the algorithm.
* Modified the grid search upper bounds functions for the relaxation curve-fitting. This is for both the exponential relaxation curve-fitting analysis and the same fitting in the dispersion analysis. The intensity values are doubled and then rounded to the next order. This ensures that I0 I<sub>0</sub> and Iinf I<sub>&infin;</sub> will be within the grid bounds. Hence the zooming grid search can be used for these curves.
* Expanded the documentation for the minimise.calculate user function. This now explains the dual operations of the user function.
* Fixes for some relaxation dispersion system tests not converted to the new optimisation user functions. Minimisation is now via the minimise.execute user function, which used to be the minimise user function.
* Modified check for model, to accept model as input, for error printing. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Implemented back end for estimating R2eff and errors by exponential curve fitting with scipy.optimize.leastsq. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Documentation fix for new exponential target function. Also added new function to estimate R2eff and i0 I<sub>0</sub> parameters, before minimisation. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Small changes to verification scripts, to use &chi;<sup>2</sup> function and use the scaling matrix correct. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Split up of system test test_r1rho_kjaergaard_missing_r1, into a verification part. This is to test the new r2eff estimation, which should get the parameter values, as a this 2000 Monto Carlo simulation. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Clean up of the target function C files (spacing fixes and removal of unused code).
* Changed the argument and variable names in the C code chi-squared gradient function.
* Modified all of the exponential curve functions and gradients in the C target function module. Instead of passing in the parameter vector, now the I0 I<sub>0</sub> and R values are passed in separately. This is for greater code flexibility as the parameter order does not need to be known.
* The parameter index is now passed into exponential_dI0() and exponential_dR(). This is for the relaxation curve-fitting C module so that the indices are not hardcoded.
* The I0 I<sub>0</sub> and R parameter indices are now defined in the target_function/relax_fit.h header file. This is to abstract the exponential curve parameter indices even more.
* Big cleanup of estimate R2eff module. This is to make the documentation more easy to read and understand. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Created 2 unit tests for the target_functions.relax_fit relax C module. These check the func() and dfunc() Python methods exposed by the module.
* Modified wrapper function for curve_fit, to only change to list type, if the type is a ndarray. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* The model-free reset_min_stats() function has been replaced with the pipe_control.minimise version. The specific_analyses.model_free.optimisation.reset_min_stats() function has been deleted and instead the pipe_control.minimise version is being used.
* Implemented the first try to compute the variance of R2eff and i0I<sub>0</sub>, by the covariance. This uses the Jacobian matrix. The errors calculated, are though way to small compared 2000 Monte Carlo simulations. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Tried to implement the Jacobian from C code. This though also report errors which are to small. Maybe some scaling is wrong. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Modified profiling script to calculate timings. The timings for C code are: Simplex, with constraints = 2.192; Simplex, without constraints = 0.216; BFGS, without constraints = 0.079; Newton, without constraints = 0.031; This is pretty pretty fast. To this profiling script, I would also now add some verification on calculations.
* Clean up of the declarations in the target_functions.relax_fit C module. The Python list objects are now declared at the start of the functions, and then PyList_New() is called later on. This allows the code to compile on certain Windows systems.
* Removed the user function to estimate the R2eff values and errors with scipy.optimize.leastsq. With the newly implemented Jacobian and Hessian of the exponential decay function, the front-end to scipy.optimize.leastsq does not serve a purpose. This is because minfx is now as fast as scipy.optimize.leastsq, and can estimate the errors from the Jacobian to the exact same numbers as scipy.optimize.leastsq. In addition to that, the covariance can be calculated by QR decomposition. This adds additional feature for checking for a singular matrix. The back-end will still be kept in place for the coming tim, but could be removed later. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Added front-end to the new user function relax_disp.r2eff_err_estimate(), which will estimate the R2eff errors from a pipe and spins with optimised values of R2eff and i0I<sub>0</sub>. The covariance matrix can be calculated from the optimised parameters, and the Jacobian. Big care should be taken not to directly trust these results, since the errors are quite different compared to the Monte Carlo simulations. This implementation, will reach the exact same error estimation as scipy.optimize.leastsq. But with much better control over the data, and insight into the calculations. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Added method to automatically perform error analysis on peak heights. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Modified system test Relax_disp.test_estimate_r2eff() to first do a grid search, then minimise and then estimate the errors for R2eff and i0I<sub>0</sub>. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Added back-end to estimate R2eff errors. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Fix to system test test_estimate_r2eff_error(), to first delete the old error estimations. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Moved unnecessary function in R2eff error estimate module into experimental class. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Implemented system test: 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. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* An attempt at documenting the Monte Carlo simulation verses covariance matrix error estimates. This is for the R2eff and I0 I<sub>0</sub> 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.
* 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.
* Epydoc fixes for the pipe_control.mol_res_spin.format_info_full() function.
* Modified data script generator, to handle a situation with fixed 5 time points, and a situations with variable number of time points. Also modified analysis script. It seems, this has an influence how the error estimation is performing. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Added simulations that show, there is perfect agreement between Monte Carlo simulations and covariance estimation. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Inserted extra tests in system test Relax_disp.test_estimate_r2eff_err_methods to test that all values of R and i0 I<sub>0</sub> are positive, and the standard deviation from Monte Carlo simulations are equal. [https://gna.org/task/?7822 Task #7822]: Implement user function to estimate R2eff and associated errors for exponential curve fitting.
* Inserted system test Relax_disp.test_finite_value, to illustrate the return of inf from C code exponential, when R is negative. This can be an issue, if minfx takes a wrong step when no constraints are implemented. [https://gna.org/bugs/?22552 Bug #22552]: Chi2 value returned from C code curve-fitting return 0.0 for wrong parameters -> Expected influence on Monte Carlo sim.
* Inserted possibility for bootstrapping in system test Relax_disp.test_estimate_r2eff_err_methods. This shows, that the bootstrapping method get the SAME estimation for R2eff errors, as the estimate_r2eff_err() function. This must either mean, that the OLD Monte Carlo simulation was corrupted, or the creation of data in Monte Carlo simulations is corrupted.
Trusted, Bureaucrats
4,228

edits