mailr19778 - /branches/relax_disp/specific_analyses/relax_disp/parameters.py


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

Header


Content

Posted by edward on May 29, 2013 - 18:10:
Author: bugman
Date: Wed May 29 18:10:34 2013
New Revision: 19778

URL: http://svn.gna.org/viewcvs/relax?rev=19778&view=rev
Log:
Fix for the linear constraints for the 'R2eff' model.

The A and b matrices are no longer set to None, as this kills the 
auto-analysis or any analysis when
constraints are turned on.  Now the constraints 0 <= R2eff <= 200 and I0 >= 0 
are used.


Modified:
    branches/relax_disp/specific_analyses/relax_disp/parameters.py

Modified: branches/relax_disp/specific_analyses/relax_disp/parameters.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/parameters.py?rev=19778&r1=19777&r2=19778&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp/parameters.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp/parameters.py Wed May 29 
18:10:34 2013
@@ -436,9 +436,27 @@
     i = 0
     j = 0
 
-    # The R2eff model (no need for constraints).
+    # The R2eff model.
     if cdp.model == MODEL_R2EFF:
-        return None, None
+        # Only use the parameters of the first spin of the cluster.
+        spin = spins[0]
+        for k in range(len(spin.params)):
+            # Effective transversal relaxation rate.
+            if spin.params[k] == 'r2eff':
+                A.append(zero_array * 0.0)
+                A.append(zero_array * 0.0)
+                A[j][i] = 1.0
+                A[j+1][i] = -1.0
+                b.append(0.0)
+                b.append(-200.0 / scaling_matrix[i, i])
+                j += 2
+
+            # Initial intensity.
+            elif spin.params[i] == 'i0':
+                A.append(zero_array * 0.0)
+                A[j][i] = 1.0
+                b.append(0.0)
+                j += 1
 
     # All other models.
     else:




Related Messages


Powered by MHonArc, Updated Wed May 29 20:20:06 2013