mailr27806 - /branches/frame_order_cleanup/target_functions/frame_order.py


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

Header


Content

Posted by edward on March 12, 2015 - 16:09:
Author: bugman
Date: Thu Mar 12 12:38:58 2015
New Revision: 27806

URL: http://svn.gna.org/viewcvs/relax?rev=27806&view=rev
Log:
Bug fix for the frame order target function (introduced recently in r27715).

The copy.deepcopy() function is now used for all numpy input data to avoid 
the data from being
modified between function calls.  This is important for missing RDC and PCS 
data which is sent in as
NaN values.  In the target function __init__() method, the NaN values are 
replaced by 0.0 after the
self.missing_rdc and self.missing_pcs structures have been by checking for 
NaN values.  However the
recent specific_analyses.frame_order.optimisation change in the 
Frame_order_minimise_command slave
command to printout the number of integration points resulted in the target 
function being
initialised twice, causing all NaN values to be 0.0 in the second 
initialisation.  Hence all missing
data was being treated as real data with values of 0.0.


Modified:
    branches/frame_order_cleanup/target_functions/frame_order.py

Modified: branches/frame_order_cleanup/target_functions/frame_order.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/target_functions/frame_order.py?rev=27806&r1=27805&r2=27806&view=diff
==============================================================================
--- branches/frame_order_cleanup/target_functions/frame_order.py        
(original)
+++ branches/frame_order_cleanup/target_functions/frame_order.py        Thu 
Mar 12 12:38:58 2015
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2009-2014 Edward d'Auvergne                                  
 #
+# Copyright (C) 2009-2015 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax (http://www.nmr-relax.com).         
 #
 #                                                                            
 #
@@ -120,21 +120,21 @@
 
         # Store the agrs.
         self.model = model
-        self.full_tensors = full_tensors
-        self.full_in_ref_frame = full_in_ref_frame
-        self.rdc = rdcs
-        self.rdc_weights = rdc_weights
-        self.rdc_vect = rdc_vect
-        self.dip_const = dip_const
-        self.pcs = pcs
-        self.pcs_weights = pcs_weights
-        self.atomic_pos = atomic_pos
-        self.temp = temp
-        self.frq = frq
+        self.full_tensors = deepcopy(full_tensors)
+        self.full_in_ref_frame = deepcopy(full_in_ref_frame)
+        self.rdc = deepcopy(rdcs)
+        self.rdc_weights = deepcopy(rdc_weights)
+        self.rdc_vect = deepcopy(rdc_vect)
+        self.dip_const = deepcopy(dip_const)
+        self.pcs = deepcopy(pcs)
+        self.pcs_weights = deepcopy(pcs_weights)
+        self.atomic_pos = deepcopy(atomic_pos)
+        self.temp = deepcopy(temp)
+        self.frq = deepcopy(frq)
         self.total_num_params = len(init_params)
         self.sobol_max_points = sobol_max_points
         self.sobol_oversample = sobol_oversample
-        self.com = com
+        self.com = deepcopy(com)
         self.pivot_opt = pivot_opt
         self.quad_int = quad_int
 




Related Messages


Powered by MHonArc, Updated Fri Mar 13 11:40:02 2015