mailr19399 - /trunk/specific_analyses/api_common.py


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

Header


Content

Posted by edward on April 05, 2013 - 19:57:
Author: bugman
Date: Fri Apr  5 19:57:42 2013
New Revision: 19399

URL: http://svn.gna.org/viewcvs/relax?rev=19399&view=rev
Log:
The common spin methods of the specific analysis API now ignore parameters 
not in the model.

This affects the _data_init_spin(), _sim_init_values_spin(), and 
_sim_return_param_spin() methods.
The result is that the spin containers no longer hold parameter variables set 
to None for non-model
parameters.


Modified:
    trunk/specific_analyses/api_common.py

Modified: trunk/specific_analyses/api_common.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/api_common.py?rev=19399&r1=19398&r2=19399&view=diff
==============================================================================
--- trunk/specific_analyses/api_common.py (original)
+++ trunk/specific_analyses/api_common.py Fri Apr  5 19:57:42 2013
@@ -99,6 +99,10 @@
 
         # Loop over the parameters.
         for name in self.PARAMS.loop(set='params', scope='spin', 
error_names=False, sim_names=sim):
+            # Not a parameter of the model.
+            if name not in data_cont.params:
+                continue
+
             # The default value.
             param_type = self.PARAMS.get_type(name)
             if param_type == dict:
@@ -573,6 +577,10 @@
 
             # Loop over all the data names.
             for object_name in param_names:
+                # Not a parameter of the model.
+                if object_name not in spin.params:
+                    continue
+
                 # Name for the simulation object.
                 sim_object_name = object_name + '_sim'
 
@@ -678,6 +686,10 @@
 
         # Loop over the residue specific parameters.
         for param in self.data_names(set='params'):
+            # Not a parameter of the model.
+            if param not in spin.params:
+                continue
+
             # Return the parameter array.
             if index == inc:
                 return getattr(spin, param + "_sim")




Related Messages


Powered by MHonArc, Updated Fri Apr 05 20:00:02 2013