mailr25564 - in /branches/est_par_error/test_suite/shared_data/dispersion/estimate_par_err/dpl94: ./ dpl94_der.log dpl94_der.py


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

Header


Content

Posted by tlinnet on September 02, 2014 - 18:35:
Author: tlinnet
Date: Tue Sep  2 18:35:20 2014
New Revision: 25564

URL: http://svn.gna.org/viewcvs/relax?rev=25564&view=rev
Log:
Added derivation of DPL94, which seems simple to implement.

task #7824(https://gna.org/task/index.php?7824): Model parameter ERROR 
estimation from Jacobian and Co-variance matrix of dispersion models.

Added:
    
branches/est_par_error/test_suite/shared_data/dispersion/estimate_par_err/dpl94/
    
branches/est_par_error/test_suite/shared_data/dispersion/estimate_par_err/dpl94/dpl94_der.log
    
branches/est_par_error/test_suite/shared_data/dispersion/estimate_par_err/dpl94/dpl94_der.py

Added: 
branches/est_par_error/test_suite/shared_data/dispersion/estimate_par_err/dpl94/dpl94_der.log
URL: 
http://svn.gna.org/viewcvs/relax/branches/est_par_error/test_suite/shared_data/dispersion/estimate_par_err/dpl94/dpl94_der.log?rev=25564&view=auto
==============================================================================
--- 
branches/est_par_error/test_suite/shared_data/dispersion/estimate_par_err/dpl94/dpl94_der.log
       (added)
+++ 
branches/est_par_error/test_suite/shared_data/dispersion/estimate_par_err/dpl94/dpl94_der.log
       Tue Sep  2 18:35:20 2014
@@ -0,0 +1,30 @@
+Form the Jacobian matrix by:
+------------------------------------------------------------------------------
+
+d_f_d_r1rho_prime = sin(theta)**2
+
+d_f_d_phi_ex = kex*sin(theta)**2/(kex**2 + spin_lock_fields2)
+
+d_f_d_kex = -2*kex**2*phi_ex*sin(theta)**2/(kex**2 + spin_lock_fields2)**2 + 
phi_ex*sin(theta)**2/(kex**2 + spin_lock_fields2)
+
+d_f_d_theta = -2*R1*sin(theta)*cos(theta) + 
2*kex*phi_ex*sin(theta)*cos(theta)/(kex**2 + spin_lock_fields2) + 
2*r1rho_prime*sin(theta)*cos(theta)
+
+d_f_R1 = cos(theta)**2
+
+------------------------------------------------------------------------------
+
+Form the Jacobian matrix by:
+------------------------------------------------------------------------------
+
+d_f_d_r1rho_prime = sin(theta)**2
+
+d_f_d_phi_ex = kex*sin(theta)**2/(kex**2 + spin_lock_fields2)
+
+d_f_d_kex = phi_ex*(-kex**2 + spin_lock_fields2)*sin(theta)**2/(kex**2 + 
spin_lock_fields2)**2
+
+d_f_d_theta = (kex*phi_ex + (-R1 + r1rho_prime)*(kex**2 + 
spin_lock_fields2))*sin(2*theta)/(kex**2 + spin_lock_fields2)
+
+d_f_R1 = cos(theta)**2
+
+------------------------------------------------------------------------------
+

Added: 
branches/est_par_error/test_suite/shared_data/dispersion/estimate_par_err/dpl94/dpl94_der.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/est_par_error/test_suite/shared_data/dispersion/estimate_par_err/dpl94/dpl94_der.py?rev=25564&view=auto
==============================================================================
--- 
branches/est_par_error/test_suite/shared_data/dispersion/estimate_par_err/dpl94/dpl94_der.py
        (added)
+++ 
branches/est_par_error/test_suite/shared_data/dispersion/estimate_par_err/dpl94/dpl94_der.py
        Tue Sep  2 18:35:20 2014
@@ -0,0 +1,57 @@
+from sympy import *
+
+# In contrast to other Computer Algebra Systems, in SymPy you have to 
declare symbolic variables explicitly:
+r1rho_prime = Symbol('r1rho_prime')
+phi_ex = Symbol('phi_ex')
+kex = Symbol('kex')
+theta = Symbol('theta')
+R1 = Symbol('R1')
+spin_lock_fields2 = Symbol('spin_lock_fields2')
+
+
+sin_theta2 = sin(theta)**2
+R1_R2 = R1 * cos(theta)**2 + r1rho_prime * sin_theta2
+# The numerator.
+numer = sin_theta2 * phi_ex * kex
+# Denominator.
+denom = kex**2 + spin_lock_fields2
+back_calc = R1_R2 + numer / denom
+
+d_f_d_r1rho_prime = diff(back_calc, r1rho_prime)
+d_f_d_phi_ex = diff(back_calc, phi_ex)
+d_f_d_kex = diff(back_calc, kex)
+d_f_d_theta = diff(back_calc, theta)
+d_f_R1 = diff(back_calc, R1)
+
+print("""Form the Jacobian matrix by:
+------------------------------------------------------------------------------
+
+d_f_d_r1rho_prime = %s
+
+d_f_d_phi_ex = %s
+
+d_f_d_kex = %s
+
+d_f_d_theta = %s
+
+d_f_R1 = %s
+
+------------------------------------------------------------------------------
+""" % (d_f_d_r1rho_prime, d_f_d_phi_ex, d_f_d_kex, d_f_d_theta, d_f_R1) )
+
+
+print("""Form the Jacobian matrix by:
+------------------------------------------------------------------------------
+
+d_f_d_r1rho_prime = %s
+
+d_f_d_phi_ex = %s
+
+d_f_d_kex = %s
+
+d_f_d_theta = %s
+
+d_f_R1 = %s
+
+------------------------------------------------------------------------------
+""" % (simplify(d_f_d_r1rho_prime), simplify(d_f_d_phi_ex), 
simplify(d_f_d_kex), simplify(d_f_d_theta), simplify(d_f_R1)) )




Related Messages


Powered by MHonArc, Updated Tue Sep 02 20:20:02 2014