mailr6904 - /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 09, 2008 - 18:22:
Author: bugman
Date: Wed Jul  9 18:22:10 2008
New Revision: 6904

URL: http://svn.gna.org/viewcvs/relax?rev=6904&view=rev
Log:
Updated the assemble_param_vector() method to return the correct parameter 
vector.


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=6904&r1=6903&r2=6904&view=diff
==============================================================================
--- branches/rdc_analysis/specific_fns/n_state_model.py (original)
+++ branches/rdc_analysis/specific_fns/n_state_model.py Wed Jul  9 18:22:10 
2008
@@ -138,28 +138,52 @@
         # Alias the current data pipe.
         cdp = ds[ds.current_pipe]
 
+        # Determine the data type.
+        data_type = self.__determine_data_type()
+
+        # Initialise the parameter vector.
+        param_vector = []
+
+        # A RDC data type requires the alignment tensors to be at the start 
of the parameter vector.
+        if data_type == 'rdc':
+            # Loop over the alignments, adding the alignment tensor 
parameters to the parameter vector.
+            for i in xrange(len(cdp.rdc_ids)):
+                param_vector = param_vector + cdp.align_tensors[i]
+
         # Monte Carlo simulation data structures.
         if sim_index != None:
-            probs = cdp.probs_sim[sim_index]
-            alpha = cdp.alpha_sim[sim_index]
-            beta = cdp.beta_sim[sim_index]
-            gamma = cdp.gamma_sim[sim_index]
+            # Populations.
+            if cdp.model in ['2-domain', 'population']:
+                probs = cdp.probs_sim[sim_index]
+
+            # Euler angles.
+            if cdp.model == '2-domain':
+                alpha = cdp.alpha_sim[sim_index]
+                beta = cdp.beta_sim[sim_index]
+                gamma = cdp.gamma_sim[sim_index]
 
         # Normal data structures.
         else:
-            probs = cdp.probs
-            alpha = cdp.alpha
-            beta = cdp.beta
-            gamma = cdp.gamma
+            # Populations.
+            if cdp.model in ['2-domain', 'population']:
+                probs = cdp.probs
+
+            # Euler angles.
+            if cdp.model == '2-domain':
+                alpha = cdp.alpha
+                beta = cdp.beta
+                gamma = cdp.gamma
 
         # The probabilities (exclude that of state N).
-        param_vector = probs[0:-1]
+        if cdp.model in ['2-domain', 'population']:
+            param_vector = param_vector + probs[0:-1]
 
         # The Euler angles.
-        for i in xrange(cdp.N):
-            param_vector.append(alpha[i])
-            param_vector.append(beta[i])
-            param_vector.append(gamma[i])
+        if cdp.model == '2-domain':
+            for i in xrange(cdp.N):
+                param_vector.append(alpha[i])
+                param_vector.append(beta[i])
+                param_vector.append(gamma[i])
 
         # Convert all None values to zero (to avoid conversion to NaN).
         for i in xrange(len(param_vector)):




Related Messages


Powered by MHonArc, Updated Wed Jul 09 18:40:13 2008