mailr4832 - in /1.3: generic_fns/value.py specific_fns/__init__.py specific_fns/base_class.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 - 17:16:
Author: bugman
Date: Thu Jan 17 17:16:22 2008
New Revision: 4832

URL: http://svn.gna.org/viewcvs/relax?rev=4832&view=rev
Log:
Implemented the base class method set_non_spin_params().

This throws a RelaxError if anything is sent into the function.


Modified:
    1.3/generic_fns/value.py
    1.3/specific_fns/__init__.py
    1.3/specific_fns/base_class.py

Modified: 1.3/generic_fns/value.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/value.py?rev=4832&r1=4831&r2=4832&view=diff
==============================================================================
--- 1.3/generic_fns/value.py (original)
+++ 1.3/generic_fns/value.py Thu Jan 17 17:16:22 2008
@@ -155,7 +155,7 @@
 
     # Specific functions.
     return_value = get_specific_fn('return_value', 
relax_data_store[relax_data_store.current_pipe].pipe_type)
-    set_nonspin_params = get_specific_fn('set_nonspin_params', 
relax_data_store[relax_data_store.current_pipe].pipe_type)
+    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)
@@ -201,7 +201,7 @@
     #######################
 
     if other_params:
-        set_nonspin_params(value=other_values, param=other_params)
+        set_non_spin_params(value=other_values, param=other_params)
 
 
     # Reset all minimisation statistics.

Modified: 1.3/specific_fns/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/__init__.py?rev=4832&r1=4831&r2=4832&view=diff
==============================================================================
--- 1.3/specific_fns/__init__.py (original)
+++ 1.3/specific_fns/__init__.py Thu Jan 17 17:16:22 2008
@@ -191,6 +191,10 @@
         if eqi == 'set_error':
             function = inst.set_error
 
+        # Set non-spin specific parameters function.
+        if eqi == 'set_non_spin_params':
+            function = inst.set_non_spin_params
+
         # Set the selected simulations array.
         if eqi == 'set_selected_sim':
             function = inst.set_selected_sim

Modified: 1.3/specific_fns/base_class.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/base_class.py?rev=4832&r1=4831&r2=4832&view=diff
==============================================================================
--- 1.3/specific_fns/base_class.py (original)
+++ 1.3/specific_fns/base_class.py Thu Jan 17 17:16:22 2008
@@ -203,6 +203,20 @@
 
             # Increment.
             inc = inc + 1
+
+
+    def set_non_spin_params(self, value=None, param=None):
+        """Base class method which complains loudly if anything is supplied 
to it.
+
+        @param value:   The parameter values.
+        @type value:    None, number, or list of numbers
+        @param param:   The parameter names.
+        @type param:    None, str, or list of str
+        """
+
+        # Throw a RelaxError.
+        if value or param:
+            raise RelaxError, "Do not know how to handle the non-spin 
specific parameters " + `param` + " with the values " + `value`
 
 
     def set_update(self, param, spin):




Related Messages


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