mailr4839 - /1.3/generic_fns/value.py


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

Header


Content

Posted by edward on January 17, 2008 - 18:20:
Author: bugman
Date: Thu Jan 17 18:20:36 2008
New Revision: 4839

URL: http://svn.gna.org/viewcvs/relax?rev=4839&view=rev
Log:
Modified the partition_params() function to better handle when no parameter 
name is supplied.

This situation is used for setting the parameter values of the model.  The 
function now returns the
model_values list to be used later on.


Modified:
    1.3/generic_fns/value.py

Modified: 1.3/generic_fns/value.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/value.py?rev=4839&r1=4838&r2=4839&view=diff
==============================================================================
--- 1.3/generic_fns/value.py (original)
+++ 1.3/generic_fns/value.py Thu Jan 17 18:20:36 2008
@@ -113,27 +113,18 @@
                     values.append(val)
 
 
-    # All other parameters.
+    # No parameter name supplied, so these must be the model parameter 
values.
     else:
         # List of values.
         if type(val) == list or isinstance(val, ndarray):
-            # Parameter name.
-            for i in xrange(len(val)):
-                spin_params.append(param)
-
-            # Parameter value.
-            spin_values = val
+            model_values = val
 
         # Single value.
-        else:
-            # Parameter name.
-            spin_params.append(param)
-
-            # Parameter value.
-            spin_values.append(val)
+        elif val:
+            model_values = [val]
 
     # Return the partitioned parameters and values.
-    return spin_params, spin_values, other_params, other_values
+    return spin_params, spin_values, other_params, other_values, model_values
 
 
 def set(val=None, param=None, spin_id=None, force=False):
@@ -158,7 +149,7 @@
     set_non_spin_params = get_specific_fn('set_non_spin_params', 
relax_data_store[relax_data_store.current_pipe].pipe_type)
 
     # Partition the parameters into those which are spin specific and those 
which are not.
-    spin_params, spin_values, other_params, other_values = 
partition_params(val, param)
+    spin_params, spin_values, other_params, other_values, model_values = 
partition_params(val, param)
 
 
     # Spin specific parameters.




Related Messages


Powered by MHonArc, Updated Thu Jan 17 20:40:17 2008