mailr18266 - /trunk/maths_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 January 23, 2013 - 11:21:
Author: bugman
Date: Wed Jan 23 11:21:27 2013
New Revision: 18266

URL: http://svn.gna.org/viewcvs/relax?rev=18266&view=rev
Log:
The probabilities and paramagnetic position can now be simultaneously in the 
N-state model.

Such a combination would have previously failed to unpack the parameters 
correctly.


Modified:
    trunk/maths_fns/n_state_model.py

Modified: trunk/maths_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/maths_fns/n_state_model.py?rev=18266&r1=18265&r2=18266&view=diff
==============================================================================
--- trunk/maths_fns/n_state_model.py (original)
+++ trunk/maths_fns/n_state_model.py Wed Jan 23 11:21:27 2013
@@ -638,16 +638,22 @@
         # Initial chi-squared (or SSE) value.
         chi2_sum = 0.0
 
+        # Unpack both the probabilities and paramagnetic centre.
+        if not self.probs_fixed and not self.centre_fixed:
+            # The probabilities.
+            self.probs = params[-(self.N-1)-3:-3]
+
+            # The position (also update the paramagnetic info).
+            self.paramag_centre = params[-3:]
+            self.paramag_info()
+
         # Unpack the probabilities (located at the end of the parameter 
array).
-        if not self.probs_fixed:
+        elif not self.probs_fixed:
             self.probs = params[-(self.N-1):]
 
-        # Unpack the paramagnetic centre.
-        if not self.centre_fixed:
-            # The position.
+        # Unpack the paramagnetic centre (also update the paramagnetic info).
+        elif not self.centre_fixed:
             self.paramag_centre = params[-3:]
-
-            # Update the paramagnetic info.
             self.paramag_info()
 
         # Loop over each alignment.




Related Messages


Powered by MHonArc, Updated Wed Jan 23 16:20:01 2013