Author: bugman Date: Wed Jul 17 11:03:37 2013 New Revision: 20346 URL: http://svn.gna.org/viewcvs/relax?rev=20346&view=rev Log: Speed up for the lib.dispersion.ns_matrices.rcpmg_3d() function. The pA and pB parameters are now sent into the function rather than being recreated by the function. Modified: branches/relax_disp/lib/dispersion/ns_matrices.py Modified: branches/relax_disp/lib/dispersion/ns_matrices.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/lib/dispersion/ns_matrices.py?rev=20346&r1=20345&r2=20346&view=diff ============================================================================== --- branches/relax_disp/lib/dispersion/ns_matrices.py (original) +++ branches/relax_disp/lib/dispersion/ns_matrices.py Wed Jul 17 11:03:37 2013 @@ -112,7 +112,7 @@ return temp -def rcpmg_3d(R1A=None, R1B=None, R2A=None, R2B=None, dw=None, k_AB=None, k_BA=None): +def rcpmg_3d(R1A=None, R1B=None, R2A=None, R2B=None, pA=None, pB=None, dw=None, k_AB=None, k_BA=None): """Definition of the 3D exchange matrix. @keyword R1A: The longitudinal, spin-lattice relaxation rate for state A. @@ -123,6 +123,10 @@ @type R2A: float @keyword R2B: The transverse, spin-spin relaxation rate for state B. @type R2B: float + @keyword pA: The population of state A. + @type pA: float + @keyword pB: The population of state B. + @type pB: float @keyword dw: The chemical exchange difference between states A and B in rad/s. @type dw: float @keyword k_AB: The forward exchange rate from state A to state B. @@ -137,10 +141,6 @@ wA = 0.0 wB = dw - # Recreate the populations. - pA = k_BA / (k_BA + k_AB) - pB = k_AB / (k_BA + k_AB) - # Create the matrix. temp = matrix([ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],