mailr27236 - in /branches/frame_order_cleanup: ./ specific_analyses/relax_disp/api.py


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

Header


Content

Posted by edward on January 20, 2015 - 14:03:
Author: bugman
Date: Tue Jan 20 14:03:23 2015
New Revision: 27236

URL: http://svn.gna.org/viewcvs/relax?rev=27236&view=rev
Log:
Merged revisions 27165 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r27165 | tlinnet | 2015-01-14 16:10:03 +0100 (Wed, 14 Jan 2015) | 3 lines
  
  Fix in dispersion API, to set error value for clustered values.
  
  Bug #23186 (https://gna.org/bugs/index.php?23186): Error calculation of 
individual parameter "dw" from Monte-Carlo, is based on first spin.
........

Modified:
    branches/frame_order_cleanup/   (props changed)
    branches/frame_order_cleanup/specific_analyses/relax_disp/api.py

Propchange: branches/frame_order_cleanup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jan 20 14:03:23 2015
@@ -1 +1 @@
-/trunk:1-27116,27119-27164
+/trunk:1-27116,27119-27165

Modified: branches/frame_order_cleanup/specific_analyses/relax_disp/api.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/relax_disp/api.py?rev=27236&r1=27235&r2=27236&view=diff
==============================================================================
--- branches/frame_order_cleanup/specific_analyses/relax_disp/api.py    
(original)
+++ branches/frame_order_cleanup/specific_analyses/relax_disp/api.py    Tue 
Jan 20 14:03:23 2015
@@ -1123,8 +1123,8 @@
             param_name, si, mi = param_index_to_param_info(index=index, 
spins=spins)
         else:
             param_name = aux_params[index - total_param_num]
-            si = 0
-            mi = 0
+            si = None
+            mi = None
 
         # The parameter error name.
         err_name = param_name + "_err"
@@ -1140,8 +1140,15 @@
 
         # Model and auxiliary parameters.
         else:
-            for spin in spins:
-                setattr(spin, err_name, error)
+            # If clustered paramater:
+            if si == None:
+                for spin in spins:
+                    setattr(spin, err_name, error)
+
+            # If independent value.
+            else:
+                # Set the value.
+                setattr(spins[si], err_name, error)
 
 
     def set_param_values(self, param=None, value=None, index=None, 
spin_id=None, error=False, force=True):
@@ -1486,7 +1493,9 @@
         if model_param:
             param_name, si, mi = param_index_to_param_info(index=index, 
spins=spins)
             if not param_name in ['r2eff', 'i0']:
-                si = 0
+                if si == None:
+                    si = 0
+
         else:
             param_name = aux_params[index - total_param_num]
             si = 0




Related Messages


Powered by MHonArc, Updated Tue Jan 20 14:20:03 2015