Author: tlinnet Date: Sun Jun 15 08:53:45 2014 New Revision: 23956 URL: http://svn.gna.org/viewcvs/relax?rev=23956&view=rev Log: Lowered the number of dot operations, by pre-preparing the evolution matrix another round. The power is in system tests always even. The trick to removing this for loop, would be to make a general multi dot function. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. Modified: branches/disp_spin_speed/lib/dispersion/ns_cpmg_2site_3d.py Modified: branches/disp_spin_speed/lib/dispersion/ns_cpmg_2site_3d.py URL: http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/lib/dispersion/ns_cpmg_2site_3d.py?rev=23956&r1=23955&r2=23956&view=diff ============================================================================== --- branches/disp_spin_speed/lib/dispersion/ns_cpmg_2site_3d.py (original) +++ branches/disp_spin_speed/lib/dispersion/ns_cpmg_2site_3d.py Sun Jun 15 08:53:45 2014 @@ -138,10 +138,10 @@ Rexpo = matrix_exponential(R*tcp[i]) # Temp matrix. - t_mat = Rexpo.dot(r180x).dot(Rexpo).dot(Rexpo).dot(r180x).dot(Rexpo) + t_mat = Rexpo.dot(r180x).dot(Rexpo).dot(Rexpo).dot(r180x).dot(Rexpo).dot(Rexpo).dot(r180x).dot(Rexpo).dot(Rexpo).dot(r180x).dot(Rexpo) # Loop over the CPMG elements, propagating the magnetisation. - for j in range(power[i]): + for j in range(power[i]/2): Mint = t_mat.dot(Mint) # The next lines calculate the R2eff using a two-point approximation, i.e. assuming that the decay is mono-exponential.