mailr6933 - /branches/rdc_analysis/specific_fns/n_state_model.py


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

Header


Content

Posted by edward on July 10, 2008 - 13:30:
Author: bugman
Date: Thu Jul 10 13:30:26 2008
New Revision: 6933

URL: http://svn.gna.org/viewcvs/relax?rev=6933&view=rev
Log:
Made diagonal scaling optional.


Modified:
    branches/rdc_analysis/specific_fns/n_state_model.py

Modified: branches/rdc_analysis/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/specific_fns/n_state_model.py?rev=6933&r1=6932&r2=6933&view=diff
==============================================================================
--- branches/rdc_analysis/specific_fns/n_state_model.py (original)
+++ branches/rdc_analysis/specific_fns/n_state_model.py Thu Jul 10 13:30:26 
2008
@@ -47,11 +47,13 @@
 class N_state_model(Common_functions):
     """Class containing functions for the N-state model."""
 
-    def __assemble_scaling_matrix(self, data_type=None):
+    def __assemble_scaling_matrix(self, data_type=None, scaling=True):
         """Create and return the scaling matrix.
 
         @keyword data_type: The type of data used in the optimisation - 
either 'rdc' or 'tensor'.
         @type data_type:    str
+        @keyword scaling:   If False, then the identity matrix will be 
returned.
+        @type scaling:      bool
         @return:            The square and diagonal scaling matrix.
         @rtype:             numpy rank-2 array
         """
@@ -61,6 +63,10 @@
 
         # Initialise.
         scaling_matrix = identity(self.param_num(), float64)
+
+        # Return the identity matrix.
+        if not scaling:
+            return scaling_matrix
 
         # Starting point of the populations.
         pop_start = 0
@@ -737,8 +743,8 @@
         # Determine if alignment tensors or RDCs are to be used.
         data_type = self.__determine_data_type()
 
-        # Get the scaling matrix.
-        scaling_matrix = self.__assemble_scaling_matrix(data_type=data_type)
+        # Diagonal scaling.
+        scaling_matrix = self.__assemble_scaling_matrix(data_type=data_type, 
scaling=scaling)
 
         # Set up minimisation using alignment tensors.
         if data_type == 'tensor':




Related Messages


Powered by MHonArc, Updated Thu Jul 10 14:00:18 2008