mailRe: [task #7793] Speed-up of dispersion models


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on May 19, 2014 - 10:58:
Hi,

The matrix_exponential() and square_matrix_power() functions are the
problem.  If an equivalent for an array of matrices could be designed,
it could be added as a new function to
lib.linear_algebra.matrix_exponential and
lib.linear_algebra.matrix_power.  This is a difficult problem.

Regards,

Edward


On 19 May 2014 10:46, Troels E. Linnet <NO-REPLY.INVALID-ADDRESS@xxxxxxx> 
wrote:
Follow-up Comment #18, task #7793 (project relax):

It remains still to figure out how to speed up the numerical models:

The problem is how to make a 3 dimensional array, which is a list which
contains matrices.

Each matrix is multiplied with for example a constant tcp.

############
# Loop over the time points, back calculating the R2eff values.
for i in range(num_points):
    # This matrix is a propagator that will evolve the magnetization with 
the
matrix R for a delay tcp.
    eR_tcp = matrix_exponential(R*tcp[i])

    # This is the propagator for an element of [delay tcp; 180 deg pulse; 2
times delay tcp; 180 deg pulse; delay tau], i.e. for 2 times tau-180-tau.
    prop_2 = dot(dot(eR_tcp, matrix_exponential(cR2*tcp[i])), eR_tcp)

    # Now create the total propagator that will evolve the magnetization 
under
the CPMG train, i.e. it applies the above tau-180-tau-tau-180-tau so many
times as required for the CPMG frequency under consideration.
    prop_total = square_matrix_power(prop_2, power[i])

    # Now we apply the above propagator to the initial magnetization vector 
-
resulting in the magnetization that remains after the full CPMG pulse train.
It is called M of t (t is the time after the CPMG train).
    Moft = dot(prop_total, M0)

##########

    _______________________________________________________

Reply to this item at:

  <http://gna.org/task/?7793>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


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

This is the relax-devel mailing list
relax-devel@xxxxxxx

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



Related Messages


Powered by MHonArc, Updated Tue May 20 21:40:14 2014