Changes

Jump to navigation Jump to search

Relax 3.3.0

418 bytes removed, 20:18, 16 October 2020
m
Switch to the {{gna task link}} template to remove dead Gna! links.
* Bug fix for the parameter units descriptions. This only affects a few rare parameters. The [http://www.nmr-relax.com/api/3.3/specific_analyses.parameter_object.Param_list-class.html#units specific analysis API parameter object units() method] was incorrectly checking if the units value is a function - it was checking the parameter conversion factor instead.
* Modified the [http://www.nmr-relax.com/manual/align_tensor_init.html align_tensor.init user function] so that the parameters are now optional. This allows alignment tensors to be initialised without specifying the parameter values for that tensor.
* Modified profiling script to have different number of NCYC points per frequency. This is to complicate the data, so any erroneous reshaping of data is discovered. It is expected, that experiments can have different number of NCYC points per spectrometer frequency. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Initial try to alter the [http://www.nmr-relax.com/api/3.3/target_functions.relax_disp.Dispersion-class.html#calc_CR72_chi2 target function calc_CR72_chi2]. This is the first test to restructure the arrays, to allow for higher dimensional computation. All numpy arrays have to have same shape to allow to multiply together. The dimensions should be [ei][si][mi][oi][di]. [Experiment][spins][spec. frq][offset][disp points]. This is complicated with number of disp point can change per spectrometer frequency. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}. This implementation brings a high overhead. The first test shows no winning of time. The creation of arrays takes all the time.
* Temporary changed the [http://www.nmr-relax.com/api/3.3/lib.dispersion.cr72-module.html lib/dispersion/cr72.py] function to unsafe state. This change turns-off all the safety measures, since they have to be re-implemented for higher dimensional structures.
* Altered profiling script to report cumulative timings and save to temporary files. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}. This indeed shows that the efficiency has gone down.* Added print out of &chi;<sup>2</sup> to profile script. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the creation of special numpy structures outside target function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Modified profiling script to calculate correct values when setting up R<sub>2eff</sub> values. This is to test, that the return of &chi;<sup>2</sup> gets zero. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removing looping over exp and offset indices in calc_chi2. They are always 0 anyway. This brings a little speed. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* In profiling script, moved up the calculation of values one level. This is to better see the output of the profiling iterations for [http://www.nmr-relax.com/api/3.3/lib.dispersion.cr72-module.html CR72.py]. [https://gna.org/{{gna task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Fix for calculation of the Larmor frequency per spin in profiling script. The frq loop should also be up-shifted. It was now extracted as 0.0. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Re-inserted safety checks in [http://www.nmr-relax.com/api/3.3/lib.dispersion.cr72-module.html lib/dispersion/CR72.py] file. This is re-inserted for the rank_1 cases. This makes the unit-tests pass again. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Important fix for extracting the correct shape to create new arrays. If using just one field, or having the same number of dispersion points, the shape would extend to the dispersion number. It would report [ei][si][mi][oi][di] when calling ndarray.shape. Shape always has to be reported as: [ei][si][mi][oi]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Made it easier to switch between single and cluster reporting in profiling script. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Important fix for the creation of the multi dimensional p<sub>A</sub> numpy array. It should be created as numpy.zeros([ei][si][mi][oi]) instead of numpy.ones([ei][si][mi][oi]). This allows for rapid testing of all dimensions with np.allclose(pA, numpy.ones(dw.shape)). p<sub>A</sub> can have missing filled out values, when the number of dispersion points are different per spectrometer frequency. [https://gna.org/{{gna task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added unit tests demonstrating edge cases 'no Rex' failures of the model [[CR72 full]], for a clustered multi dimensional calculation. This is implemented for one field. This is to implement catching of math domain errors, before they occur. These tests cover all parameter value combinations which result in no exchange: [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Re-implemented safety checks in [http://www.nmr-relax.com/api/3.3/lib.dispersion.cr72-module.html lib/dispersion/cr72.py]. This is now implemented for both rank-1 float array and of higher dimensions. This makes the unit tests pass for multi dimensional computing. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added unit tests demonstrating edge cases 'no Rex' failures of the model [[CR72 full]], for a clustered multi dimensional calculation. This is implemented for three fields. This is to implement catching of math domain errors, before they occur. These tests cover all parameter value combinations which result in no exchange: [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Changed that special numpy structure is also created for [[CR72]]. This makes most system tests pass. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Critical fix for the slicing of values in target function. This makes system test: Relax_disp.test_sod1wt_t25_to_cr72 pass. [https://gna.org/{{gna task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added self.has_missing keyword in initialization of the Dispersion class. This is to test once, per spin or cluster. This saves a looping over the dispersion points, when collection the data. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Created multi dimensional error and value numpy arrays. This is to calculate the &chi;<sup>2</sup> sum much faster. Reordered the loop over missing data points, so it is only initiated if missing points is detected. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Switch the looping from spin->frq to frq->spin. Since the number of dispersion points are the same for all spins, this allows to move the calculation of p<sub>A</sub> and k<sub>ex</sub> array one level up. This saves a lot of computation. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Changed all the creation of special numpy arrays to be of float64 type. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the data filling of special numpy array errors and values, to initialization of Dispersion class. These values does not change, and can safely be stored outside. [https://gna.org/{{gna task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Just a tiny little more speed, by removing temporary storage of &chi;<sup>2</sup> calculation. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Made copies of numpy arrays instead of creating from new. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added a self.frqs_a as a multidimensional numpy array. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Small fix for the indices to the errors and values numpy array. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Lowered the number of iterations to the profiling scripts. This is to use the profiling script as bug finder. [https://gna.org/{{gna task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the calculation of dw_frq out of spin and spectrometer loop. This is done by having a special 1/0 spin numpy array, which turns on or off the values in the numpy array multiplication. The multiplication needs to first axis expand &Delta;&omega;, and then tile the arrays according to the numpy structure. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the calculation of p<sub>A</sub> and k<sub>ex</sub> out off all loops. This was done by having two special 1/0 spin structure arrays. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed dw_frq_a numpy array, as it was not necessary. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed all looping over spin and spectrometer frequency. This is the last loop! Wuhu. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Reordered arrays for beauty of code. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Made the back_calc array be initiated as copy of the values array. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Small edit to profiling script, to help bug finding. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Fixed that arrays are correctly initiated with one or zero values. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Very important fix, for only replacing part of data array which have Nan values. Before, all values were replaced, which was wrong. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Needed to increase the relative tolerance when testing if p<sub>A</sub> array is 1. Now system test Relax_disp.test_hansen_cpmg_data_missing_auto_analysis passes. Also added some comments lines, to prepare for mask replace of values. For example if only some of etapos values should be replaced. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Restored profiling script to normal. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Made the logic and comments much clearer about how to reshape, expand axis, and tile numpy arrays. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Implemented a masked array search for where "missing" array is equal 1. This makes it possible to replace all values with this mask, from the value array. This eliminates the last loops over the missing values. It took over 4 hours to figure out, that the mask should be called with mask.mask, to return the same fulls structure, [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Yet another small improvement for the profiling script. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed the multi dimensional structure of p<sub>A</sub>. p<sub>A</sub> is not multi-dimensional, and can just be multiplied with numpy arrays. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Fix for testing of p<sub>A</sub> in lib function, when p<sub>A</sub> is just float. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Modified unit tests, so p<sub>A</sub> is sent to target function as float instead of array. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed the multi dimensional structure of k<sub>ex</sub>. k<sub>ex</sub> is not multi-dimensional, and can just be multiplied with numpy arrays. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Fix for testing of k<sub>ex</sub> in lib function, when k<sub>ex</sub> is just float. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Modified unit tests, so k<sub>ex</sub> is sent to target function as float instead of array. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Important fix for replacing values if eta_pos > 700 is violated. This fixes system test: Relax_disp.test_sod1wt_t25_to_cr72, which failed after making k<sub>ex</sub> to a numpy float. The trick is to make a numpy mask which stores the position where to replace the values. Then replace the values just before last return. This makes sure, that not all values are changed. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Increased the k<sub>ex</sub> speed to 1e<sup>7</sup> in clustered unit tests cases. This is to demonstrate where there will be no excange. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added a multi-dimensional numpy array &chi;<sup>2</sup> value calculation function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Called the newly created &chi;<sup>2</sup> function to calculate for multi dimensional numpy arrays. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Renamed chi2_ND to chi2_rankN. This is a better name for representing multiple axis calculation. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Made special ei, si, mi, and oi numpy structure array. This is for rapid speed-up of numpy array creation in target function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Replaced self.spins_a with self.disp_struct. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Made initialisation structures for &Delta;&omega;. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Initial try to reshape &Delta;&omega; faster. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Switched to use self.ei, self.si, self.mi, self.oi, self.di. This is for better reading of code. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Comment out the sys.exit(), which would make the code fail for wrong calculation of &Delta;&omega;. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Copied profiling script for CPMG model [[CR72]] to R<sub>1&rho;</sub> [[DPL94]] model. The framework of the script will be the same, but the data a little different. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Started converting profiling script to [[DPL94]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Replaced self.(ei,si,mi,oi,di) with self.(NE,NS,NM,NO,ND). These numbers represents the maximum number of dimensions, instead of index. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added the ei index, when creating the first dw_mask. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Reordered how the structures &Delta;&omega; init structures are created. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Clearing the dw_struct before calculation. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Started using the new way of constructing &Delta;&omega;. This is for running system tests. Note, somewhere in the &Delta;&omega; array, the frequencies will be different between the two implementations. But apparently, this does not matter. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Inserted temporary method to switch for profiling. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* First try to speed-up the old &Delta;&omega; structure calculation. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Simplified calculation. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Yet another try to implement a fast &Delta;&omega; structure method. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Implemented the fastest way to calculate the &Delta;&omega; structure. This uses the numpy ufunc multiply.outer function to create the outer array, and then multiply with the frqs_structure. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Renamed &Delta;&omega; temporary structure to generic structure. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Restructured the calculation of R<sub>2A</sub><sup>0</sup> and R<sub>2B</sub><sup>0</sup> to the most efficient way. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Made the [http://www.nmr-relax.com/api/3.3/lib.dispersion.cr72-module.html lib/dispersion/CR72.py] to a numpy multi dimensional numpy array calculation. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Changed the catching when &Delta;&omega; is zero, to use masked array. Implemented backwards compatibility with unit tests. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Bugfix for testing if k<sub>ex</sub> is zero. It was tested if k<sub>ex</sub> was equal 1.0. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Implemented masked replacement if fact is less that 1.0. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Replaced isnan mask with function that catches all invalid values.
* Removed the masked replacement if fact is less than 1.0. This is very strange, but otherwise system test: Relax_disp.test_hansen_cpmg_data_missing_auto_analysis would fail. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed the slow allclose() function to test if R<sub>2A</sub><sup>0</sup> and R<sub>2B</sub><sup>0</sup> is equal. It is MUCH faster to just subtract and check sum is not 0.0. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Replaced the temporary variable R<sub>2eff</sub> with back_calc, and used numpy subtract to speed up. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Made the lib function into a pure numpy array calculation. This requires, that R<sub>2A</sub><sup>0</sup>, R<sub>2B</sub><sup>0</sup> and &Delta;&omega; has same dimension as the dispersion points. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Changes too unit tests, so data is sent to target function in numpy array format. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed the creation of an unnecessary structure by using numpy multiply. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the mask which finds where to replace values into the __init__ function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Copied profiling script for [[CR72]] to [[B14]] model. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Modified profiling script for the [[B14]] model. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Modified model [[B14]] lib file to faster numpy multidimensional mode. The implementations comes almost directly from the [[CR72]] model file. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Reverted the use of the mask "mask_set_blank". It did not work, and many system tests started failing. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Changed the target function to handle the [[B14]] model for faster numpy computation. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Changed unit test for [[B14]] to match numpy input requirement. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added additional tests in [[B14]], when math errors can occur. This is very easy with a conditional masked search in arrays. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Comment fix for finding when E0 is above 700 in lib function of [[B14]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed use of "asarray", since the variables are already arrays. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Changed target function for model [[CR72]]. To [[CR72]] is now also the input of the parameters of R<sub>2A</sub><sup>0</sup>, R<sub>2B</sub><sup>0</sup> and &Delta;&omega;. &Delta;&omega; is tested for zero, to return flat lines. It is faster to search in the smaller numpy array, than the 5 dimensional &Delta;&omega; array. This is for speed-up. R<sub>2A</sub><sup>0</sup> and R<sub>2B</sub><sup>0</sup> is also subtracted, to see if the full model should be used. In the same way, it is faster to subtract the smaller array. These small tricks are expected to give 5-10 pct. speeed-up. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Made the lib function of [[CR72]] accept the R<sub>2A</sub><sup>0</sup>, R<sub>2B</sub><sup>0</sup> and &Delta;&omega; of the original array. This is for speed-up. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Changed unit-tests, to send in the original R<sub>2A</sub><sup>0</sup>, R<sub>2B</sub><sup>0</sup> and dw_orig to the testing of the lib function [[CR72]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Changed profiling script to send R<sub>2A</sub><sup>0</sup>, R<sub>2B</sub><sup>0</sup> and &Delta;&omega;, as original parameters to the lib function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Changed target function for model [[B14]]. To [[B14]] now also send the input of the original parameters &Delta;&omega;. &Delta;&omega; is tested for zero, to return flat lines. It is faster to search in the smaller numpy array, than the 5 dimensional &Delta;&omega; array. This is for speed-up. These small tricks are expected to give 5-10 pct. speed-up. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Made the lib function of [[B14]] accept &Delta;&omega; of the original array. This is for speed-up. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Changed unit-tests, to send in the original dw_orig to the testing of the lib function [[B14]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Changed profiling script to send &Delta;&omega; as original parameters to the lib function [[B14]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Copied profiling script for [[CR72]] model to [[TSMFK01]] model. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Modified profiling script to be used for model [[TSMFK01]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Modified target function for model [[TSMFK01]], to send in &Delta;&omega; as original parameter. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Modified lib function for model [[TSMFK01]] to accept dw_orig as input and replaced functions to find math domain errors into maske replacements. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Made unit tests for model [[TSMFK01]] send in R<sub>2A</sub><sup>0</sup> and &Delta;&omega; as a numpy array. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Large increase in speed for model [[TSMFK01]] by changing target functions to use multidimensional numpy arrays in calculation. This is done by restructuring data into multidimensional arrays of dimension [NE][NS][NM][NO][ND], which are number of spins, number of magnetic field strength, number of offsets, maximum number of dispersion point. The speed comes from using numpy ufunc operations. The new version is 2.4X as fast per spin calculation, and 54X as fast for clustered analysis.
* Replacing math domain checking in model [[DPL94]], with masked array replacement. [https://gna.org/task/?7807 Task #7807: Speed-up of dispersion models for clustered analysis].* First try to speed up model [[DPL94]]. This has not succeeded, since system test: Relax_disp.test_dpl94_data_to_dpl94 still fails. [https://gna.org/task/?7807 Task #7807: Speed-up of dispersion models for clustered analysis].* Trying to move some of the structures into its own part. [https* Replacing math domain checking in model [[DPL94]], with masked array replacement. {{gna task link|7807|text=Task #7807: Speed-up of dispersion models for clustered analysis}}.* First try to speed up model [[DPL94]]. This has not succeeded, since system test: Relax_disp.test_dpl94_data_to_dpl94 still fails. {{gna task link|7807|text=Task #7807: Speed-up of dispersion models for clustered analysis}}.* Trying to move some of the structures into its own part. {{gna task link|
* The relaxation dispersion target function can now be set up when the optional frqs_H argument is None. This allows the profiling scripts to run.
* More stability fixes for the relaxation dispersion target function initialisation. The target function can now be initialised when the r1 and chemical_shift arguments are None.
* Split the system test test_r1rho_kjaergaard into a setup function, and a test function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Renamed system test test_r1rho_kjaergaard to test_r1rho_kjaergaard_auto. This corresponds to the use of the automatic analysis method. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Split system test test_r1rho_kjaergaard into test_r1rho_kjaergaard_auto and test_r1rho_kjaergaard_man. This is to test use of the manual way to analyse. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Modified all of {{relax developer link|username=tlinnet|text=Troels'}} dispersion profiling scripts to work with older relax versions. This is in preparation for obtaining some powerful timing statistics. The calls to the r2eff_*() functions are unnecessary and are the only failure point in the scripts between the current code in the disp_spin_speed branch and trunk or older versions of relax. So these function calls have been eliminated.
* Implemented system test test_r1rho_kjaergaard_missing_r1, for safety check if R<sub>1</sub> data is not loaded. The system test passes, so target function is safe. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Python 3 support for the dispersion profiling scripts. The xrange() builtin function does not exist in Python 3, so this is now aliased to range() which is the same thing.
* Replaced double or triple hash-tags "##" with single hash-tags "#". [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Copyright fixes for all the models, where {{relax developer link|username=tlinnet|text=Troels E. Linnet}} have made changes to make them functional for higher dimensional data. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Copyright fix for model [[TSMFK01]]. {{relax developer link|username=semor|text=Sebastien Morin}} did not take part of implementing the [[TSMFK01]] model. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Created a super script for profiling the relaxation dispersion models. This script will execute all of the current profiling scripts in the directory test_suite/shared_data/dispersion/profiling for both the current version of relax and any other specified version (current set to the [[relax 3.2.2|3.2.2 relax]] tag). It will run the scripts and relax versions interleaved N=10 times and extract the func_*() target function call profile timings. This interleaving makes the numbers much more consistent. Averages and standard deviations are then calculated, as well as the speed up between the two relax versions. The results are printed out in a format suitable for the relax release messages.
* Increased the number of iterations to 1000 in all of the profiling scripts. This is for better statistics in the disp_profile_all.py script, and makes the number consistent between the different models.
* Added a log file for comparing the speed of the disp_speed_branch to [[relax 3.2.2]]. This is from the disp_profile_all.py statistics generating script.
* Made the processor.return_object get the back_calc structure in the expected order. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Fixed the ordering of the relax versions in the dispersion super profiling script disp_profile_all.py. This has also been fixed in the disp_spin_speed branch to [[relax 3.2.2]] comparison log.
* Added a log file for comparing the speed of the disp_speed_branch to [[relax 3.2.1]]. This is from the disp_profile_all.py statistics generating script.
* Added a script for profiling the [[NS CPMG 2-site 3D]] relaxation dispersion model. Again this only involved copying one of the other scripts and modifying a few variable and function names.
* Added the [[NS CPMG 2-site 3D]] model to the dispersion super profiling script. To handle the fact that this script has nr_iter set to 100 rather than 1000 (as otherwise it is too slow), a list of scaling factors has been created to scale all timing numbers to equivalent values.
* Added [[DPL94]] profiling script. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Modified profiling script for [[TSMFK01]], to use correct parameters k<sub>AB</sub> and R<sub>2A</sub><sup>0</sup>. Or else, the lib functions is just calculating with zero? [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Changes to profiling script of [[NS CPMG 2-site expanded]]. The model does not have R<sub>2A</sub><sup>0</sup> and R<sub>2B</sub><sup>0</sup>, but only R<sub>2</sub>. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Made changes to the profiling script of [[NS CPMG 2-site 3D]]. Need to use the full model, when r2a and r2b is specified. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Changes to profiling script of [[NS CPMG 2-site expanded]]. The unpacking can be removed. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Fix for the profiling script of [[NS CPMG 2-site 3D]]. The model should also be specified to full. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* The disp_profile_all.py super script now prints out the current relax version information. This is so that the log files contain information about the repository revision and path.
* Copied profiling script of [[DPL94]] to [[NS R1rho 2-site]].
* Improved the final printout from the disp_profile_all.py dispersion model super profiling script.
* Added profiling script for [[NS R1rho 2-site]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* The disp_profile_all.py dispersion model super profiling script is now executable.
* Decreased all nr_iter values by 10 and added more dispersion models to the super profiling script. This is for the dispersion model profiling scripts in test_suite/shared_data/dispersion/profiling/, all controlled by the disp_profile_all.py super profiling script for generating statistics using all of the other profiling scripts. The number of iterations needed to be decreased as otherwise it would now take almost 1 day to generate the statistics table.
* Moved the parter conversion in [[LM63 3-site]] into the lib function. This cleans up the target api function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Copied profiling script for [[DPL94]] to [[TAP03]].
* Copied profiling script for [[DPL94]] to [[TP02]].
* Copied profiling script for [[DPL94]] to [[MP05]].
* Copied profiling script for [[DPL94]] to [[M61]].
* Modified profiling script for [[TAP03]] to be used. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Modified profiling script for [[TP02]], to be used. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Modified profiling script for [[MP05]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Modified profiling script for [[M61]]. This is the last one. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Expansion of the disp_profile_all.py dispersion model super profiling scripts. The newly added profiling scripts for models [[M61]], [[TP02]], [[TAP03]], and [[MP05]] are now included in the super script to generate statistics for all of these as well. The nr_iter variable has also been changed to match the other analytic models, so that the standard deviations are lowered and the statistics are better.
* Moved the parameter conversion of [[MMQ CR72]] into lib function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the parameter conversions of k<sub>AB</sub>, k<sub>BA</sub> and p<sub>B</sub> into lib function of [[NS MMQ 2-site]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the parameter conversion from target function to lib function for [[NS R1rho 2-site]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Updated the dispersion model speed statistics for the disp_spin_speed branch vs. [[relax 3.2.2|relax-3.2.2]]. This now includes the [[NS CPMG 2-site 3D]], [[DPL94]], and [[NS R1rho 2-site]] dispersion models. The timings for the single spin analyses are now comparable to the clustered analysis, as the equivalent of 100 single spins is being used. The final printout is also in a better format to present for the relax release messages. These new results show the insane 160x speed up of the [[DPL94]] model.
* Alignment improvements for the final printout from the dispersion model super profiling script. The log file has been updated with what the new formatting will look like.
* Updated the model names in the dispersion model super profiling script. The [[CR72]], [[B14]] and [[NS CPMG 2-site 3D]] models are the full, slower versions rather than the faster models with R<sub>2</sub><sup>0</sup> = R<sub>2A</sub><sup>0</sup> = R<sub>2B</sub><sup>0</sup>. The log file has been updated to match.
* Moved the parameter conversion for [[NS MMQ 3-site]] into lib function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Updated the dispersion model profiling comparison of the disp_spin_speed branch vs. [[relax 3.2.2|relax-3.2.2]]. The [[M61]], [[TP02]], [[TAP03]], and [[MP05]] models are now included. The final printout has been manually updated to reflect the newest version of the disp_profile_all.py super profiling script.
* Moved the parameter conversion for [[NS R1rho 3-site]] into lib function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Copied profiling script for [[CR72]], so there is now a normal and a full version.
* Copied profiling for [[B14]] to normal and full model.
* Copied profiling script for [[NS CPMG 2-site star]].
* Copied profiling script for [[No Rex]].
* Modified profiling script for [[B14]], to R<sub>2A</sub><sup>0</sup>=R<sub>2B</sub><sup>0</sup>. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Implemented profiling script for [[NS CPMG 2-site 3D]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Implemented profiling script for [[NS CPMG 2-site star]] and [[NS CPMG 2-site star full|star full]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Copied profiling script to be used for [[LM63]].
* Copied profiling script to model [[IT99]].
* Added profiling script for [[IT99]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Implemented profiling script for [[LM63]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the "eta_scale = 2.0**(-3.0/2.0)" out of lib function for [[MMQ CR72]], since this is only needs to be computed once. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Fix for spaces aroung "=" outside functions. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Critical fix for wrong space inserted in [[NS MMQ 3-site]] MQ. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Fixed the input for unit test of [[MMQ CR72]]. The number of input parameters has been lowered. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added additional math domain checking in [[B14]]. This is when v1c is less than 1.0. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Comment fixing, for explaining the masking and replacing when &Delta;&omega; is zero. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Copied profiling script to be used for profiling the use of higher dimensional data for the numpy eig function.
* Implemented the collection of the 3D exchange matrix, for rank [NE][NS][NM][NO][ND][7][7]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Implemented test, to see if 3D exchange matrices are the same. This can be tested while running system test test_hansen_cpmg_data_to_ns_cpmg_2site_3D. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Shifted the computation of Rexpo two loops up. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added intermediate step with for loops. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added another intermediate step. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added function to compute the matrix exponential for higher dimensional data of shape [NE][NS][NM][NO][ND][7][7]. This is done by using numpy.einsum, to make the dot product of the last two axis. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Inserted intermediate step, to check if the matrix propagator to evolve the magnetization is equal when done for lower dimensional data of shape [7][7] and higher dimensional data of shape [NE][NS][NM][NO][ND][7][7]. A short example is shown at the wiki: http://wiki.nmr-relax.com/Numpy_linalg#Ellipsis_broadcasting_in_numpy.einsum. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Implemented double speed of model [[NS CPMG 2-site 3D]]. This is done by moving the costly calculation of the matrix exponential out of the for loops. The trick was to find a method to do dot product of higher dimensions. This was done with numpy.einsum, example at: http://wiki.nmr-relax.com/Numpy_linalg#Ellipsis_broadcasting_in_numpy.einsum. Example: dot_V_W = einsum('...ij,...jk', V, W_exp_diag) where V, and W_exp_diag has shape [NE][NS][NM][NO][ND][7][7]. The profiling script shows a 2X speed up.
* Made notation consistent for variables, using "_i" to clarify extracted data from matrix. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Moved the calculation the evolution matrix out of for loops. The trick is that numpy.einsum allows for dot product of higher dimension: The essential evolution matrix; This is a dot product of the outer [7][7] matrix of the Rexpo_mat and r180x_mat matrices, which have the shape [NE][NS][NM][NO][ND][7][7]; This can be achieved by using numpy einsum, and where ellipsis notation will use the last axis.
* Implemented system test: test_cpmg_synthetic_b14_to_ns3d_cluster. This is to catch failures of the model, when data is clustered. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed unused variables in [[NS CPMG 2-site 3D]], to clean up the code. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added the NS matrices, rr1rho_3d_rankN, to collect the multi dimensional 3D exchange matrix, of rank [NE][NS][NM][NO][ND][6][6]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added a check in [http://www.nmr-relax.com/api/3.3/lib.dispersion.ns_r1rho_2site-module.html lib/dispersion/ns_r1hro_2site.py], to see if the newly created multidimensional ns matrix of rank NE][NS][NM][NO][ND][6][6], is equal to the previous [6][6] matrix. It is. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added the relax_time to collection of rr1rho_3d_rankN matrix collection. This is to pre-multiply all elements with the time. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added a check, that the pre- relax_time multiplied multidimensional array, equal the previous. It does, to the sum of 1.0e<sup>-13</sup>. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Made the function use the new multidimensional R_mat matrix. System test: test_tp02_data_to_ns_r1rho_2site still passes. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Fix to the matrix_exponential_rankN, to return the exact exponential for any higher dimensional square matrix of shape [NE][NS][NM][NO][ND][X][X]. The fix was to the eye(X), to make the shape the same as the input shape. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Moved the costly calculation of the matrix exponential out of for loops. It was the numpy.eig and numpy.inv which was draining power. This speeds up model [[NS R1rho 2-site]], by a factor 4X.
* Made the returned multidimensional rr1rho_3d_rankN, be of float64 type. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Cleaned up the code of [[NS R1rho 2-site]], and removed the matrix argument to the function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed the parsing of a matrix to the lib function of [[NS R1rho 2-site]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added the function "rcpmg_star_rankN" for the collection of the multidimensional relaxation matrix for model [[NS CPMG 2-site star]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Insert check, that the newly created multidimensional matrix is the same. They are, but only to the fifth digit. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Started using the newly created multidimensional matrix. test_hansen_cpmg_data_to_ns_cpmg_2site_star. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added the system test: test_cpmg_synthetic_b14_to_ns_star_cluster, to check for the model is still working after change. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Started using the newly cR2 variable, extracted from higher dimensional data. This should be okay, but system test test_hansen_cpmg_data_to_ns_cpmg_2site_star, now fails.
* Changes of values to system test test_hansen_cpmg_data_to_ns_cpmg_2site_star. The values are changed, since &chi;<sup>2</sup> is lower than before. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the costly finding of matrix exponential out of for loops for eR_tcp. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Rearranged the code, to properly show the nested matrix exponentials in dot functions. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the costly matrix_exponential of cR2 out of for loops. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Rearranged the dot code, for better view. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Cleaned up the code in model [[NS CPMG 2-site star]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Simplified model [[NS CPMG 2-site 3D]]. The expansion of matrices to higher dimensionality is not necessary. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Further cleaned up the code in [[NS CPMG 2-site star]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed input of matrix, Rr, Rex, RCS and R to model [[NS CPMG 2-site star]]. These matrices is now extracted from NS matrix function rcpmg_star_rankN. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Implemented the collection of the multidimensional matrix m1 and m2 in model [[NS MMQ 2-site]]. Inserted also a check, that the newly computed matrix is equal. They are, to the 6 digit. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Started using the newly created multidimensional m1 and m2 matrices. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the costly calculation of matrix_exponential of M1 and M2 out of for loop, in model ns_mmq_2site_mq. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Made the function matrix_exponential_rankN also find the exponential if the experiments indices are missing. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Fix for an extra axis inserted in eye function, when dimensionality is only [NS][NM][NO][ND]. This also fixes the index in the lib function of ns_mmq_2site_mq. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Implemented same functionality in mmq_2site_sq_dq_zq. Problem, following system test fails: test_korzhnev_2005_15n_dq_data, test_korzhnev_2005_15n_mq_data, test_korzhnev_2005_15n_sq_data, test_korzhnev_2005_1h_mq_data, test_korzhnev_2005_1h_sq_data, test_korzhnev_2005_all_data, test_korzhnev_2005_all_data_disp_speed_bug. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed grid search, and lowered number of iterations for system test: test_cpmg_synthetic_b14_to_ns3d_cluster, test_cpmg_synthetic_b14_to_ns_star_cluster. This is to speed them up, since they before took 30 seconds. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Fix for ns_mmq_2site_mq. Variable was wrong called. There seems to be a serious problem more with MQ.
* Reinserted old code. This fixes: test_korzhnev_2005_15n_mq_data. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Forcing the dtype to be complex64, instead of complex128. This solves a range of system tests. The one who fails now is: test_korzhnev_2005_15n_zq_data, test_korzhnev_2005_1h_mq_data, test_korzhnev_2005_1h_sq_data. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Forces complex64 in ns_mmq_2site_sq_dq_zq instead complex128. This fixes system tests: test_korzhnev_2005_15n_zq_data,test_korzhnev_2005_1h_sq_data. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Force complex64 in ns_mmq_2site_mq. This solves all system tests. Forcing to be complex64, does not seems like a long standing solution, since complex128 is possible. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Fix for using the old matrix_exponential of m1. One: test_korzhnev_2005_15n_sq_data is still failing. That still uses the matrix_exponential_rankN. There seems to be a problem with matrix_exponential_rankN, when doing complex numbers. Maybe the dtype has to get fixed? Use it as a input argument? It must be the einsum. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added the "dtype" argument to function matrix_exponential_rankN. This is to force the conversion of dtype, if they are of other type. This can be conversion from complex128 to complex64. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Fix the bug: "M2_i = M1_mat", which was causing the problems getting system tests to pass. Removed the specifications of which dtype, the initial matrices are created. They can be converted later, with the specification of dtype to matrix_exponential_rankN(). All system tests now pass. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the Bloch-McConnell matrix for 2-site exchange into [http://www.nmr-relax.com/api/3.3/lib.dispersion.ns_matrices-module.html lib/dispersion/ns_matrices.py]. This is for consistency with the other code. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the matrices for Bloch-McConnell from lib ns_mmq_2site, since they are now defined in [http://www.nmr-relax.com/api/3.3/lib.dispersion.ns_matrices-module.html ns_matrices.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the Bloch-McConnell matrix for 3-site exchange, into the [http://www.nmr-relax.com/api/3.3/lib.dispersion.ns_matrices-module.html lib/dispersion/ns_matrices.py]. This is to standardize the code. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed m1 and m2 to be sent to lib function of [[NS MMQ 2-site]], since they are now populated inside the lib function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Implemented the Bloch-McConnell matrix for 3-site exchange, for multidimensional data. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Inserted a check, that the new higher dimensional m1 and m2 matrices are equal to before. They are, to the 5 digit. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Started using the newly created higher dimensional Bloch-McConnell matrix for 3-site exchange. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the calculation of the matrix exponential out of for loops for [[NS MMQ 3-site]] MQ. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Converted [[NS MMQ 3-site]]/SQ/DQ/ZQ to calculate the matrix exponential out of the for loops. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed the complex64 to be used as dtype in matrix exponential. Fix for missing "_i" in variable. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed m1 and m2 to be sent to target function of ns_mmq_3site_chi2. They are now populated inside the lib function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Documentation and input fix for [[NS MMQ 2-site]]. The m1 and m2 matrices are populated inside the lib function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Renamed some numerical matrices, to get consistency in naming. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Implemented multidimensional [[NS R1rho 3-site]] exchange matrix. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Inserted check, that newly multi dimensional matrix is equal the old. It is, to the 13 digit. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Started using the newly multidimensional 3D exchange matrix. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved the calculation of the matrix exponential out of the for loops for [[NS R1rho 3-site]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed the parameter "matrix" to be send to lib function of [[NS R1rho 3-site]], since it is now populated inside the lib function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved parameter conversion for [[NS R1rho 3-site]] inside lib function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Cleaned up the Dispersion class target function, for creation of matrices, which is now populated inside the lib functions instead. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed p<sub>A</sub> and p<sub>B</sub> from the matrix population function rcpmg_star_rankN, since they are not used. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed p<sub>A</sub> and p<sub>B</sub> from the matrix population function rr1rho_3d_2site_rankN, since they are not used. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Documentation fix for the dimensionality for model [[NS R1rho 2-site]]. The data is lined up to be of form [NE][NS][NM][NO][ND]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed p<sub>A</sub>, p<sub>B</sub> and p<sub>C</sub> from the matrix population function rr1rho_3d_3site_rankN, since they are not used. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Deleted the profiling of eig function profiling script. This was never implemented. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* For all profiling scripts, added conversion to numpy array for CPMG frqs and spin_lock, since some models complained in [[relax 3.2.2|3.2.2]], that they were of list types. Also fixed [[IT99]] to only have 1 spin, since clustering is broken in [[relax 3.2.2|3.2.2]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Modified super profiling script, to allow input to script, where alternative version of relax is positioned. Collected the variables in a list of lists, for better overview. Added a print out comment to [[IT99]], to remember the bug. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added comment field to super profiling script. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Math domain fix for [[NS CPMG 2-site expanded]]. This is when t108 or t112 is zero, in the multidimensional array, a division error occurs. The elements are first set to 1.0, to allow for computation. Then elements are later replaced with 1e<sup>100</sup>. Lastly, if the elements are not part of the "True" dispersion point structure, they are cleaned out. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Precision lowering of system test, test_korzhnev_2005_15n_sq_data and test_korzhnev_2005_1h_sq_data. The system tests does not fail on Linux 64-bit system, but only on Mac 32-bit system. This is due to floating error deviations. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added log files for super profiling against tags [[relax 3.2.1|3.2.1]] and [[relax 3.2.2|3.2.2]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Copied lib.linear_algebra.matrix_exponential to [http://www.nmr-relax.com/api/3.3/lib.dispersion.matrix_exponential-module.html lib.dispersion.matrix_exponential]. The matrix exponential of higher dimensional data is only used in the dispersion part of relax.
* Added to __init__, the new [http://www.nmr-relax.com/api/3.3/lib.dispersion.matrix_exponential-module.html lib.dispersion.matrix_exponential module]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added to unit_tests/_lib/_dispersion/__init__.py, the new unit test file: test_matrix_exponential.py. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added numpy array save files. They are the numpy array structures, which are send in from system test: Relax_disp.test_hansen_cpmg_data_to_ns_cpmg_2site_3D. These numpy array structures, are used in unit tests. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added unit test unit_tests/_lib/_dispersion/test_matrix_exponential.py to test the matrix exponential from higher dimensional data. lib.dispersion.matrix_exponential.matrix_exponential_rankN will match against lib.linear_algebra.matrix_exponential. Data which is used for comparison, comes from system test: Relax_disp.test_hansen_cpmg_data_to_ns_cpmg_2site_3D. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Renamed function to return data in unit test _lib/_dispersion/test_matrix_exponential.py. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Fix to [http://www.nmr-relax.com/api/3.3/lib.dispersion.matrix_exponential-module.html lib/dispersion/matrix_exponential.py], since the svn copy command was used on non-updated version of the file. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added unit test for doing the matrix exponential for complex data. This test shows, that the dtype=complex64, should be removed from [http://www.nmr-relax.com/api/3.3/lib.dispersion.ns_mmq_2site-module.html lib/dispersion/ns_mmq_2site.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added data for unit test for the testing of the matrix_exponential_rankN. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Expanded the dispersion profiling master script to handle any two relax versions. To compare two relax versions, for example [[relax 3.2.2|3.2.2]] to [[relax 3.2.1|3.2.1]], either the path1 and path2 variables or two command line arguments can be supplied. The first path should be for the newest version. This will allow for comparing the speed differences between multiple relax versions in the future.
* Split matrix_exponential_rankN into matrix_exponential_rank_NE_NS_NM_NO_ND_x_x and matrix_exponential_rank_NS_NM_NO_ND_x_x. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Moved numerical solution matrices into the corresponding lib function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Copied profiling scripts, to be used for 3-site models and MMQ models.
* Implemented profiling script for [[LM63 3-site]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Improved the relax version printouts for the dispersion model master profiling script. This now reports both relax versions.
* Removed a tonne of unused imports from the dispersion model profiling scripts. This is to allow most of the scripts to run on the relax 3.1.x versions, as well as to clean up the scripts. The unused imports were found using the command: pylint test_suite/shared_data/dispersion/profiling/*.py --disable=all --enable=unused-import.
* Added a relaxation dispersion model profiling log file for relax version [[relax 3.2.0|3.2.0]] vs. [[relax 3.1.7|3.1.7]]. This is the output from the dispersion model profiling master script. It shows that there are no speed differences.
* Added a relaxation dispersion model profiling log file for relax version [[relax 3.1.7|3.1.7]] vs. [[relax 3.1.6|3.1.6]]. This is the output from the dispersion model profiling master script. It shows that there are no speed differences.
* Modified profiling script for [[NS R1rho 3-site]], to be functional. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Modified profiling script for [[NS R1rho 3-site linear]] to be functional. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Added a relaxation dispersion model profiling log file for relax version [[relax 3.1.3|3.1.3]] vs. [[relax 3.1.2|3.1.2]] vs. [[relax 3.1.1|3.1.1]]. This is the output from the dispersion model profiling master script. It shows that there are no major speed differences between these relax versions.
* Added the system information printout to the dispersion model profiling master script output. This is for the log files comparing one version of relax to the previous version.
* Added profiling script for model [[MMQ CR72]], [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Fix for the replacement value for invalid values in model [[MMQ CR72]]. The value was set to use R<sub>2</sub><sup>0</sup>, but should instead be 1e<sup>100</sup>. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Copied profiling script from [[MMQ CR72]], to [[NS MMQ 2-site]] and [[NS MMQ 3-site|3-site]].
* Copied profiling script to [[NS MMQ 3-site linear]].
* Implemented profiling script for [[NS MMQ 2-site]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Implemented profiling script for [[NS MMQ 3-site]] and [[NS MMQ 3-site linear|3-site linear]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Speeded up model [[NS CPMG 2-site star]], by moving the forming of the propagator matrix out of the for loops, and preform it. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Added a relaxation dispersion model profiling log file for relax version [[relax 3.1.4|3.1.4]] vs. [[relax 3.1.3|3.1.3]]. This is the output from the dispersion model profiling master script. It shows that there are no speed differences.
* Speeded up [[NS MMQ 2-site]], by moving the forming of evolution matrix out of the for loops, and preform it. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Speeded up [[NS MMQ 3-site]], by moving the forming of evolution matrix out of the for loops, and preform it. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Added a relaxation dispersion model profiling log file for relax version [[relax 3.1.5|3.1.5]] vs. [[relax 3.1.4|3.1.4]]. This is the output from the dispersion model profiling master script. It shows that there are no speed differences.
* Speeded up [[NS R1rho 2-site]], by preforming the evolution matrices, and the M0 matrix in the init part of the target function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Speeded up [[NS R1rho 3-site]], by preforming the evolution matrices, and the M0 matrix in the init part of the target function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Expanded the dispersion model profiling master script to cover all the new profiling scripts. This includes all 3-site and MMQ models. The list is now complete and covers all models. The only model not included in [[M61 skew]] which has redundant parameters and is not optimisable anyway.
* Added a relaxation dispersion model profiling log file for relax version [[relax 3.1.6|3.1.6]] vs. [[relax 3.1.5|3.1.5]]. This is the output from the dispersion model profiling master script. It shows that there are almost no speed differences, except for a slight decrease in speed in the [[CR72 full]] model for single spins.
* Split system test test_tp02_data_to_ns_r1rho_2site into a setup and test part. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Implemented a clustered version of system test test_tp02_data_to_ns_r1rho_2site. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Inserted an extremely interesting development in [[NS R1rho 2-site]]. If one do a transpose of M0, one can calculate all the matrix evolutions in the start via numpy einsum. Since M0 is in higher a dimensions, one should not do a numpy transpose, but swap/roll the outer M0 6x1 axis. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Shortened the code dramatically for [[NS R1rho 2-site]]. It is possible to calculate all in "one" go, after having the transposed/rolled-back M0 magnetization. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Speeded up the code of [[NS R1rho 2-site]]. This was essential done to numpy einsum, and doing the dot operations in multiple dimensions. It was though necessary to realize, that to do the proper dot product operations, the outer two axis if M0 should be swapped, by rolling the outer axis one back. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Speeded up the code of [[NS R1rho 3-site]]. This was essential done to numpy einsum, and doing the dot operations in multiple dimensions. It was though necessary to realize, that to do the proper dot product operations, the outer two axis if M0 should be swapped, by rolling the outer axis one back. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* For model [[NS CPMG 2-site 3D]], the M0 matrix was preformed for higher dimensionality in init of target function. The transposes/rolled axis versions was also initiated. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Swapped the dot product position, when propagating the magnetisation in model [[NS CPMG 2-site 3D]]. This it to try to align to same method as in [[NS R1rho 2-site]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Lowered the looping in [[NS CPMG 2-site 3D]], by preforming the initial dot product. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Speeded up [[NS CPMG 2-site 3D]], by preforming the magnetisation. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Got rid of the inner evolution of the magnetization. If the looping over the number of CPMG elements is given by the index l, and the initial magnetization has been formed, then the number of times for propagation of magnetization is l = power_si_mi_di-1. If the magnetization matrix "Mint" has the index Mint_(i,k) and the evolution matrix has the index Evol_(k,j), i=1, k=7, j=7 then the dot product is given by: Sum_{k=1}^{k} Mint_(1,k) * Evol_(k,j) = D_(1, j). The numpy einsum formula for this would be: einsum('ik,kj -> ij', Mint, Evol). Following evolution will be: Sum_{k=1}^{k} D_(1, j) * Evol_(k,j) = Mint_(1,k) * Evol_(k,j) * Evol_(k,j). We can then realize, that the evolution matrix can be raised to the power l. Evol_P = Evol<sup>l</sup>. It will then be: einsum('ik,kj -> ij', Mint, Evol_P). Get which power to raise the matrix to. l = power_si_mi_di-1. Raise the square evolution matrix to the power l. evolution_matrix_T_pwer_i = matrix_power(evolution_matrix_T_i, l), Mint_T_i = dot(Mint_T_i, evolution_matrix_T_pwer_i) or Mint_T_i = einsum('ik,kj -> ij', Mint_T_i, evolution_matrix_T_pwer_i). [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Tried to implement using lib.linear_algebra.matrix_power.square_matrix_power instead of matrix_power from numpy in [[NS CPMG 2-site 3D]]. Strangely, then system test: test_hansen_cpmg_data_to_ns_cpmg_2site_3D_full starts to fail. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Changes to unit test of [[NS CPMG 2-site 3D]]. This is after the new initiated M0 matrix in init of target function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Double speed in [[NS CPMG 2-site star]], after using numpy.linalg.matrix_power instead of the lib version in relax. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Triple speed in [[NS MMQ 2-site]], after using numpy.linalg.matrix_power instead of the lib version in relax. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Small fix for making sure that power is a integer in [[NS MMQ 2-site]]. Following system tests was failing: Relax_disp.test_korzhnev_2005_15n_dq_data, Relax_disp.test_korzhnev_2005_15n_sq_data, Relax_disp.test_korzhnev_2005_15n_zq_data, Relax_disp.test_korzhnev_2005_1h_sq_data, Relax_disp.test_korzhnev_2005_all_data, Relax_disp.test_korzhnev_2005_all_data_disp_speed_bug. They should already be integers, but is now solved. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Comment and spell fixing in [[NS CPMG 2-site 3D]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Triple speed in [[NS MMQ 3-site]], after using numpy.linalg.matrix_power instead of the lib version in relax. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Updated the dispersion model profiling comparison of the disp_spin_speed branch vs. [[relax 3.2.2|relax-3.2.2]]. This now includes all dispersion models. This shows the large speed increases in the numeric and MMQ models recently obtained. Note that something went wrong with the [[NS CPMG 2-site 3D full]] model for the clustered analysis, most times were around 24 seconds except for the first which was strangely 292 seconds.
* Updated the relaxation dispersion model profiling log file for relax version [[relax 3.2.2|3.2.2]] vs. [[relax 3.2.1|3.2.1]]. This adds the MMQ and 3-site models to the log file. The new information shows that there was a 4.2 times speed up for the [[MMQ CR72]] model between these two relax versions, both for single spins and clustered spins, a much greater improvement than any other of the models.
* Removed the now redundant disp_profile_all_3.2.2.table.txt dispersion model profiling table. As the dispersion model profiling master script now covers all dispersion models, the output from this script produces this table exactly. Therefore the end of the log files saved from running this script contains this table.
* Initiated lengthy profiling script, that shows that doing square numpy matrix_power on strided data, can speed up the calculation by factor 1.5. The profiling script can quickly be turned into a unit test, and includes small helper functions to calculate how to stride through the data. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* First try to implement function that will calculate the matrix exponential by striding through data. Interestingly, it does not work. These system tests will fail: test_hansen_cpmg_data_to_ns_cpmg_2site_3D, test_hansen_cpmg_data_to_ns_cpmg_2site_3D_full. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Added matrix_power to the init file in [http://www.nmr-relax.com/api/3.3/lib.dispersion-module.html lib/dispersion]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Deleted the printout in dep_check. The printouts are only used for the essential packages before calling sys.exit(). [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Added the missing "self.num_exp" to target function. Testing on older system, this was failing the system test. It is a wonder how these lines in __init__ could be performed without this.
* Fix for unit test passing on old numpy systems. The error was: ValueError: setting an array element with a sequence. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Expanded the dispersion target function class documentation. The NE, NS, NM, NO, and ND notation is now explained.
* Added Ti and NT to the dispersion target function class documentation.
* Slight speed up of the [[B14]] and [[B14 full]] dispersion models by minimising repetitive maths.
* Initial try to write up a 2x2 matrix by closed form. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Made the validation check in profiling of matrix_power check all values. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Replaced all self.spins with self.NS in target function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Replaced all self.num_exp with self.NE in target function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Replaced all self.num_frq with self.NM in target function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* A very small speed up to the [[CR72]] dispersion models by minimising repetitive maths operations. The k<sub>BA</sub> and k<sub>AB</sub> rates are used to simplify the Psi calculation, dropping from 3 to 2 multiplications and removing a squaring operation. The Dpos and Dneg value calculations have been simplified to drop one multiplication operation. And the calculation of eta_scale / cpmg_frqs now only occurs once rather than twice.
* Removal of a tonne of unused imports in the lib.dispersion package. These were identified using the command "pylint * --disable=all --enable=unused-import".
* A very small speed up to the [[MMQ CR72]] dispersion model by minimising repetitive maths operations. This matches the recent change for the [[CR72]] model, though the Psi calculation was already using the fast form.
* Created a master profiling script for comparing the speed between different dispersion models. This is similar to the disp_profile_all.py script except it only operates on a single relax version. The output is then simply the timings, with statistics, of the calculation time for 100 function calls for 100 spins (either 10,000 function calls for single spins or 100 function calls for the cluster of 100 spins). The output of the script for the current disp_spin_speed branch code has also been added.
* Critical fix for the recalculation of tau cpmg, when plotting for numerical models. The interpolated dispersion points with tau_cpmg was calculated with frq, instead of cpmg_frq. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* The new dispersion model profiling master script now includes links to the relax wiki. The models are no longer presented by name but rather by the relax wiki links for each model (see [[:Category:Relaxation dispersion analysis]] for all these links). This is to improve the Google rank of the relax wiki, as these links may appear in a number of locations.
* Removal of many unused imports in the disp_spin_speed branch. These were detected using the devel_scripts/find_unused_imports.py script which uses pylint to find all unused imports. The false positives also present in the trunk were ignored.
* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.b14-module.html lib/dispersion/b14.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.cr72-module.html lib/dispersion/cr72.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.dpl94-module.html lib/dispersion/dpl94.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.lm63_3site-module.html lib/dispersion/lm63_3site.py]. [https://gna.org/{{gna task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.lm63-module.html lib/dispersion/lm63.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.m61b-module.html lib/dispersion/m61b.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.m61-module.html lib/dispersion/m61.py]. [https://gna.org/{{gna task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.matrix_exponential-module.html lib/dispersion/matrix_exponential]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.mp05-module.html lib/dispersion/mp05.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.ns_cpmg_2site_expanded-module.html lib/dispersion/ns_cpmg_2site_expanded.py]. [https://gna.org/{{gna task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.ns_cpmg_2site_star-module.html lib/dispersion/ns_cpmg_2site_star.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.ns_mmq_2site-module.html lib/dispersion/ns_mmq_2site.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.ns_mmq_3site-module.html lib/dispersion/ns_mmq_3site.py]. [https://gna.org/{{gna task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.ns_r1rho_2site-module.html lib/dispersion/ns_r1rho_2site.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.ns_r1rho_3site-module.html lib/dispersion/ns_r1rho_3site.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.tap03-module.html lib/dispersion/tap03.py]. [https://gna.org/{{gna task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.tp02-module.html lib/dispersion/tp02.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/lib.dispersion.two_point-module.html lib/dispersion/two_point.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Code validation of [http://www.nmr-relax.com/api/3.3/target_functions.relax_disp-module.html target_functions/relax_disp.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* For model [[NS MMQ 3-site]], moved the parameter conversion of &Delta;&omega;<sub>AB</sub> from target function to lib function. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed chi sum initialisation in func_ns_mmq_2site() as this is not used. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Documentation fix for the [http://www.nmr-relax.com/api/3.3/target_functions.relax_disp.Dispersion-class.html#get_back_calc get_back_calc() function in target_function/relax_disp.py]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* Removed unnecessary repetitive calculation of k<sub>ex</sub><sup>2</sup> in model [[DPL94]]. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.* API documentation fixes, where a "\" is the last character on the line. There should be a space " ", ending this character. [https://{{gna.org/task/?link|7807 |text=Task #7807: Speed-up of dispersion models for clustered analysis]}}.
* Updated the {{gna link|url=gna.org/forum/forum.php?forum_id=2472|text=minfx version number to 1.0.9}} in the release checklist document. This as of yet unreleased version contains an important fix for parallelised grid searches when the number of increments is set to one (i.e. a preset parameter).
* Fix for the _prompt.test_align_tensor.Test_align_tensor.test_init_argfail_params unit test. As the alignment tensor can now be initialised as None, the None value can be accepted and a different RelaxError is raised when the params argument is incorrectly supplied.
Trusted, Bureaucrats
4,228

edits

Navigation menu