mailRe: r25002 - /branches/R1_fitting/specific_analyses/relax_disp/parameters.py


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

Header


Content

Posted by Edward d'Auvergne on August 18, 2014 - 18:52:
There is some duplicated code here, which should be avoided.  The
better logic would be to copy the value for the parameter including
R2eff.  Then have a single if statement at the end for R2eff to copy
the error value.

Cheers,

Edward

On 12 August 2014 15:24,  <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet
Date: Tue Aug 12 15:24:02 2014
New Revision: 25002

URL: http://svn.gna.org/viewcvs/relax?rev=25002&view=rev
Log:
Implemented the copying of the R2eff error, if it exists.

sr #3135(https://gna.org/support/?3135): Optimisation of the R1 relaxation 
rate for the off-resonance R1rho relaxation dispersion models.

Modified:
    branches/R1_fitting/specific_analyses/relax_disp/parameters.py

Modified: branches/R1_fitting/specific_analyses/relax_disp/parameters.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/R1_fitting/specific_analyses/relax_disp/parameters.py?rev=25002&r1=25001&r2=25002&view=diff
==============================================================================
--- branches/R1_fitting/specific_analyses/relax_disp/parameters.py      
(original)
+++ branches/R1_fitting/specific_analyses/relax_disp/parameters.py      Tue 
Aug 12 15:24:02 2014
@@ -269,8 +269,18 @@
                 if param in ['r2', 'pA', 'pB', 'pC', 'kex', 'kex_AB', 
'kex_AC', 'kex_BC', 'k_AB', 'kB', 'kC', 'tex']:
                     continue

-                # Copy the value.
-                setattr(spin_to, param, deepcopy(getattr(spin_from, 
param)))
+                elif param == 'r2eff':
+                    # Copy the value.
+                    setattr(spin_to, param, deepcopy(getattr(spin_from, 
param)))
+
+                    # If error estimation exists.
+                    param_err = '%s_err' % param
+                    if hasattr(spin_from, param_err):
+                        setattr(spin_to, param_err, 
deepcopy(getattr(spin_from, param_err)))
+
+                else:
+                    # Copy the value.
+                    setattr(spin_to, param, deepcopy(getattr(spin_from, 
param)))

     # Switch back to the original data pipe.
     pipes.switch(pipe_orig)


_______________________________________________
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 Wed Aug 20 19:20:18 2014