mailRe: r23311 - /trunk/test_suite/system_tests/scripts/relax_disp/cpmg_synthetic.py


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

Header


Content

Posted by Edward d'Auvergne on May 21, 2014 - 18:09:
Hi Troels,

The change does not match the description - there appears to be no
time structures set up.  Is this the correct change?

Regards,

Edward




On 21 May 2014 17:43,  <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet
Date: Wed May 21 17:43:49 2014
New Revision: 23311

URL: http://svn.gna.org/viewcvs/relax?rev=23311&view=rev
Log:
Modified cpmg_synthetic script to first create all time structures before 
doing back-calculation.

bug #22017: (https://gna.org/bugs/index.php?22017) LinAlgError, for all 
numerical CPMG models.

The numerical models need all time points which are defined in setup, to be 
present
when calculating.

Modified:
    trunk/test_suite/system_tests/scripts/relax_disp/cpmg_synthetic.py

Modified: trunk/test_suite/system_tests/scripts/relax_disp/cpmg_synthetic.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/relax_disp/cpmg_synthetic.py?rev=23311&r1=23310&r2=23311&view=diff
==============================================================================
--- trunk/test_suite/system_tests/scripts/relax_disp/cpmg_synthetic.py  
(original)
+++ trunk/test_suite/system_tests/scripts/relax_disp/cpmg_synthetic.py  Wed 
May 21 17:43:49 2014
@@ -380,8 +380,8 @@
             after = getattr(cur_spin, mo_param)
             print(cur_spin.model, res_name, cur_spin_id, mo_param, before)

-## Now doing the back calculation of R2eff values.
-# First loop over the frequencies.
+####### Now doing the back calculation of R2eff values.
+# First create fake data and read it in.
 for exp_type, frq, ei, mi in loop_exp_frq(return_indices=True):
     exp_id = exp_ids[mi]
     exp = exps[mi]
@@ -409,10 +409,24 @@
         # This is a trick, or else relax complains.
         relax_disp.r2eff_read_spin(id=exp_id, spin_id=cur_spin_id, 
file=file_name, dir=ds.tmpdir, disp_point_col=1, data_col=2, error_col=3)

+
+# Now back-calculate.
+for exp_type, frq, ei, mi in loop_exp_frq(return_indices=True):
+    exp_id = exp_ids[mi]
+    exp = exps[mi]
+    sfrq, time_T2, ncycs, r2eff_errs = exp
+
+    # Then loop over the spins.
+    for res_name, res_num, spin_name, params in cur_spins:
+        cur_spin_id = ":%i@%s"%(res_num, spin_name)
+        cur_spin = return_spin(cur_spin_id)
+
         ### Now back calculate values from parameters, and stuff R2eff it 
back.
         print("Generating data with MODEL:%s, for spin 
id:%s"%(model_create, cur_spin_id))
         r2effs = optimisation.back_calc_r2eff(spin=cur_spin, 
spin_id=cur_spin_id)

+        # Define file name
+        file_name = "%s%s.txt" % (exp_id, cur_spin_id .replace('#', 
'_').replace(':', '_').replace('@', '_'))
         file = open_write_file(file_name=file_name, dir=ds.resdir, 
force=True)
         ## Loop over the R2eff structure
         # Loop over the points.


_______________________________________________
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 Thu May 22 10:40:13 2014