mailr25036 - /trunk/specific_analyses/relax_disp/api.py


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

Header


Content

Posted by tlinnet on August 15, 2014 - 18:54:
Author: tlinnet
Date: Fri Aug 15 18:54:01 2014
New Revision: 25036

URL: http://svn.gna.org/viewcvs/relax?rev=25036&view=rev
Log:
Fix in relax_disp API, how to handle the r1_fit parameter type.

bug #22470(https://gna.org/bugs/index.php?22470): value.set does not work for 
parameter r1_fit.

Modified:
    trunk/specific_analyses/relax_disp/api.py

Modified: trunk/specific_analyses/relax_disp/api.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/api.py?rev=25036&r1=25035&r2=25036&view=diff
==============================================================================
--- trunk/specific_analyses/relax_disp/api.py   (original)
+++ trunk/specific_analyses/relax_disp/api.py   Fri Aug 15 18:54:01 2014
@@ -1001,8 +1001,29 @@
                 if error:
                     obj_name += '_err'
 
+                # Handle the R10 parameters.
+                if param[i] in ['r1_fit']:
+                    # Loop over the current keys.
+                    for exp_type, frq, ei, mi in 
loop_exp_frq(return_indices=True):
+                        # The parameter key.
+                        key = generate_r20_key(exp_type=exp_type, frq=frq)
+
+                        # Initialise the structure if needed.
+                        if not hasattr(spin, obj_name):
+                            setattr(spin, obj_name, {})
+
+                        # Set the value.
+                        if index == None:
+                            obj = getattr(spin, obj_name)
+                            obj[key] = value[i]
+
+                        # If the index is specified, let it match the 
frequency index
+                        elif mi == index:
+                            obj = getattr(spin, obj_name)
+                            obj[key] = value[i]
+
                 # Handle the R20 parameters.
-                if param[i] in PARAMS_R20:
+                elif param[i] in PARAMS_R20:
                     # Loop over the current keys.
                     for exp_type, frq, ei, mi in 
loop_exp_frq(return_indices=True):
                         # The parameter key.




Related Messages


Powered by MHonArc, Updated Fri Aug 15 19:00:02 2014