mailr6930 - /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 - 10:06:
Author: bugman
Date: Thu Jul 10 10:06:29 2008
New Revision: 6930

URL: http://svn.gna.org/viewcvs/relax?rev=6930&view=rev
Log:
Updated the param_num() method to take the various models into account.


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=6930&r1=6929&r2=6930&view=diff
==============================================================================
--- branches/rdc_analysis/specific_fns/n_state_model.py (original)
+++ branches/rdc_analysis/specific_fns/n_state_model.py Thu Jul 10 10:06:29 
2008
@@ -964,7 +964,7 @@
 
 
     def param_num(self):
-        """Function for determining the number of parameters in the model.
+        """Determine the number of parameters in the model.
 
         @return:    The number of model parameters.
         @rtype:     int
@@ -973,8 +973,26 @@
         # Alias the current data pipe.
         cdp = ds[ds.current_pipe]
 
+        # Determine the data type.
+        data_type = self.__determine_data_type()
+
+        # Init.
+        num = 0
+
+        # Alignment tensor params.
+        if data_type == 'rdc':
+            num = num + 5*len(cdp.rdc_ids)
+
+        # Populations.
+        if cdp.model in ['2-domain', 'population']:
+            num = num + (cdp.N - 1)
+
+        # Euler angles.
+        if cdp.model == '2-domain':
+            num = num + 3*cdp.N
+
         # Return the param number.
-        return (cdp.N - 1) + cdp.N*3
+        return num
 
 
     def return_data_name(self, name, index=False):




Related Messages


Powered by MHonArc, Updated Thu Jul 10 11:00:19 2008