Author: tlinnet Date: Wed Jun 25 03:41:05 2014 New Revision: 24307 URL: http://svn.gna.org/viewcvs/relax?rev=24307&view=rev Log: Comment and spell fixing in NS CPMG 2site 3d. 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=24307&r1=24306&r2=24307&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 Wed Jun 25 03:41:05 2014 @@ -62,7 +62,6 @@ # relax module imports. from lib.float import isNaN from lib.dispersion.matrix_exponential import matrix_exponential_rank_NE_NS_NM_NO_ND_x_x -from lib.linear_algebra.matrix_power import square_matrix_power # Repetitive calculations (to speed up calculations). m_r10a = array([ @@ -334,14 +333,13 @@ evolution_matrix_T_i = evolution_matrix_T_mat[0, si, mi, 0, di] # Get which power to raise the matrix to. - l = power_si_mi_di-1 + l = int(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) - #evolution_matrix_T_pwer_i = square_matrix_power(evolution_matrix_T_i, l).real - - Mint_T_i = dot(Mint_T_i, evolution_matrix_T_pwer_i) - #Mint_T_i = einsum('ik,kj -> ij', Mint_T_i, evolution_matrix_T_pwer_i) + evolution_matrix_T_power_i = matrix_power(evolution_matrix_T_i, l) + + # Evolve the magnetisation. + Mint_T_i = dot(Mint_T_i, evolution_matrix_T_power_i) # The next lines calculate the R2eff using a two-point approximation, i.e. assuming that the decay is mono-exponential. Mx = Mint_T_i[0][1] / pA