As before, you could convert this into a unit test.  The easiest way
would be to jump back to this revision and use print statements to
obtain all the values required to set up and execute a unit test.

Regards,

Edward


On 20 June 2014 19:13,  <[email protected]> wrote:
> Author: tlinnet
> Date: Fri Jun 20 19:13:18 2014
> New Revision: 24219
>
> URL: http://svn.gna.org/viewcvs/relax?rev=24219&view=rev
> Log:
> Inserted check, that newly multi dimensional matrix is equal the old.
>
> It is, to the 13 digit.
>
> 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_r1rho_3site.py
>
> Modified: branches/disp_spin_speed/lib/dispersion/ns_r1rho_3site.py
> URL: 
> http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/lib/dispersion/ns_r1rho_3site.py?rev=24219&r1=24218&r2=24219&view=diff
> ==============================================================================
> --- branches/disp_spin_speed/lib/dispersion/ns_r1rho_3site.py   (original)
> +++ branches/disp_spin_speed/lib/dispersion/ns_r1rho_3site.py   Fri Jun 20 
> 19:13:18 2014
> @@ -57,10 +57,10 @@
>
>  # Python module imports.
>  from math import atan2, cos, log, sin
> -from numpy import dot
> +from numpy import dot, sum
>
>  # relax module imports.
> -from lib.dispersion.ns_matrices import rr1rho_3d_3site
> +from lib.dispersion.ns_matrices import rr1rho_3d_3site, rr1rho_3d_3site_rankN
>  from lib.float import isNaN
>  from lib.linear_algebra.matrix_exponential import matrix_exponential
>
> @@ -124,6 +124,9 @@
>      # Extract shape of experiment.
>      NE, NS, NM, NO = num_points.shape
>
> +    # The matrix that contains all the contributions to the evolution, i.e. 
> relaxation, exchange and chemical shift evolution.
> +    R_mat = rr1rho_3d_3site_rankN(R1=r1, r1rho_prime=r1rho_prime, pA=pA, 
> pB=pB, pC=pC, dw_AB=dw_AB, dw_AC=dw_AC, omega=omega, offset=offset, 
> w1=spin_lock_fields, k_AB=k_AB, k_BA=k_BA, k_BC=k_BC, k_CB=k_CB, k_AC=k_AC, 
> k_CA=k_CA, relax_time=relax_time)
> +
>      # Loop over spins.
>      for si in range(NS):
>          # Loop over the spectrometer frequencies.
> @@ -159,6 +162,13 @@
>                      # The matrix that contains all the contributions to the 
> evolution, i.e. relaxation, exchange and chemical shift evolution.
>                      rr1rho_3d_3site(matrix=matrix, R1=r1_i, 
> r1rho_prime=r1rho_prime_i[j], pA=pA, pB=pB, pC=pC, wA=dA, wB=dB, wC=dC, 
> w1=spin_lock_fields_i[j], k_AB=k_AB, k_BA=k_BA, k_BC=k_BC, k_CB=k_CB, 
> k_AC=k_AC, k_CA=k_CA)
>
> +                    R_mat_i = R_mat[0, si, mi, oi]
> +                    diff = matrix*relax_time_i[j] - R_mat_i
> +                    if abs(sum(diff)) > 1e-12:
> +                        print abs(sum(diff))
> +                        print asd
> +
> +
>                      # The following lines rotate the magnetization previous 
> to spin-lock into the weff frame.
>                      theta = atan2(spin_lock_fields_i[j], dA)
>                      M0[0] = sin(theta)    # The A state initial X 
> magnetisation.
>
>
> _______________________________________________
> relax (http://www.nmr-relax.com)
>
> This is the relax-commits mailing list
> [email protected]
>
> To unsubscribe from this list, get a password
> reminder, or change your subscription options,
> visit the list information page at
> https://mail.gna.org/listinfo/relax-commits

_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel

Reply via email to