mailRe: r25521 - /branches/est_par_error/target_functions/relax_disp.py


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

Header


Content

Posted by Edward d'Auvergne on September 02, 2014 - 09:59:
I'm guessing this commit will be reverted later.

Regards,

Edward


On 1 September 2014 23:54,  <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet
Date: Mon Sep  1 23:54:38 2014
New Revision: 25521

URL: http://svn.gna.org/viewcvs/relax?rev=25521&view=rev
Log:
Inserted check in target function, that the extraction of columns are 
correct.

In systemtest: test_task_model_par_est_tsmfk01
These errors will emerge:

param: r2a_err, with err: 0.04657067, compared to MC: 0.04643541
param: dw_err, with err: 10.43218741, compared to MC: 0.02705331
param: k_AB_err, with err: 0.06457146, compared to MC: 0.06403129

This is quite weird.
The dw is totally wrong.

Data was created with:
k_AB': 11.0, 'dw': 5.0, 'r2a': {r20_key_1: 12.0}
With error on R2eff on 0.1.

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

Modified:
    branches/est_par_error/target_functions/relax_disp.py

Modified: branches/est_par_error/target_functions/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/est_par_error/target_functions/relax_disp.py?rev=25521&r1=25520&r2=25521&view=diff
==============================================================================
--- branches/est_par_error/target_functions/relax_disp.py       (original)
+++ branches/est_par_error/target_functions/relax_disp.py       Mon Sep  1 
23:54:38 2014
@@ -2199,10 +2199,37 @@
         self.r20a_struct[:] = multiply.outer( R20A.reshape(self.NE, 
self.NS, self.NM), self.no_nd_ones )

         # Get the Jacobian.
-        jabobian = r2eff_TSMFK01_jacobian(r20a=self.r20a_struct, 
dw=self.dw_struct, k_AB=k_AB, tcp=self.tau_cpmg)
+        jacobian = r2eff_TSMFK01_jacobian(r20a=self.r20a_struct, 
dw=self.dw_struct, k_AB=k_AB, tcp=self.tau_cpmg)
+
+        # Insert checks.
+        if True:
+            from lib.dispersion.tsmfk01 import d_f_d_r20a, d_f_d_dw, 
d_f_d_k_AB
+            from numpy import transpose, array, all
+            NJ, NE, NS, NM, NO, ND = jacobian.shape
+            for ei in range(NE):
+                for si in range(NS):
+                    for mi in range(NM):
+                        for oi in range(NO):
+                            print ei, si, mi, oi
+                            cur_jacobian = jacobian[0:NJ:1, ei, si, mi, oi]
+
+                            r20a_t = self.r20a_struct[ei, si, mi, oi]
+                            dw_t = self.dw_struct[ei, si, mi, oi]
+                            k_AB_t = k_AB
+                            tcp_t = self.tau_cpmg[ei, si, mi, oi]
+
+                            get_d_f_d_r20a = d_f_d_r20a(r20a=r20a_t, 
dw=dw_t, k_AB=k_AB_t, tcp=tcp_t)
+                            get_d_f_d_dw = d_f_d_dw(r20a=r20a_t, dw=dw_t, 
k_AB=k_AB_t, tcp=tcp_t)
+                            get_d_f_d_k_AB = d_f_d_k_AB(r20a=r20a_t, 
dw=dw_t, k_AB=k_AB_t, tcp=tcp_t)
+
+                            jac_t = transpose(array( [get_d_f_d_r20a , 
get_d_f_d_dw , get_d_f_d_k_AB] ) )
+
+                            #print cur_jacobian
+                            #print jac_t
+                            print jac_t == cur_jacobian

         # Return the Jacobian.
-        return jabobian
+        return jacobian


     def get_back_calc(self):


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

This is the relax-commits mailing list
relax-commits@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-commits



Related Messages


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