mailr7769 - /branches/multi_processor_merge/specific_fns/model_free/mf_minimise.py


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

Header


Content

Posted by edward on October 16, 2008 - 17:39:
Author: bugman
Date: Thu Oct 16 17:39:20 2008
New Revision: 7769

URL: http://svn.gna.org/viewcvs/relax?rev=7769&view=rev
Log:
Fixed the indentation in the disassemble_result() method.


Modified:
    branches/multi_processor_merge/specific_fns/model_free/mf_minimise.py

Modified: 
branches/multi_processor_merge/specific_fns/model_free/mf_minimise.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_processor_merge/specific_fns/model_free/mf_minimise.py?rev=7769&r1=7768&r2=7769&view=diff
==============================================================================
--- branches/multi_processor_merge/specific_fns/model_free/mf_minimise.py 
(original)
+++ branches/multi_processor_merge/specific_fns/model_free/mf_minimise.py Thu 
Oct 16 17:39:20 2008
@@ -1023,138 +1023,137 @@
     def disassemble_result(self, param_vector, func, iter, fc, gc, hc, 
warning, spin, sim_index, model_type, scaling, scaling_matrix):
         """Disassemble the optimisation results."""
 
-            #print '***', param_vector, func, iter, fc, gc, hc, warning, 
spin, sim_index, model_type, scaling
-            #self.write_columnar_line(file=sys.stdout)
-            #self.param_vector=param_vector
-
-#            print 'disassembel result'
-#            print 'param_vector', param_vector
-#            print 'func', func
-#            print 'iter', iter
-#            print 'fc', fc
-#            print 'gc', gc
-#            print 'hc', hc
-#            print 'warning', warning
-#            print 'run', run
-#            print 'index', index
-#            print 'sim_index', sim_index
-#            print ' model_type ', model_type
-#            print 'scaling', scaling
-#            print 'scaling_matrix', scaling_matrix
-            #FIXME this is a fix for old code
-#            self.iter_count = iter
-#            self.f_count = fc
-#            self.g_count = gc
-#            self.h_count = hc
-#            self.run=run
-
-            self.func=func
-            self.warning=warning
-            self.iter_count = self.iter_count + iter
-            self.f_count = self.f_count + fc
-            self.g_count = self.g_count + gc
-            self.h_count = self.h_count + hc
-
-            # Catch infinite chi-squared values.
-            if isInf(func):
-                raise RelaxInfError, 'chi-squared'
-
-            # Catch chi-squared values of NaN.
-            if isNaN(func):
-                raise RelaxNaNError, 'chi-squared'
-
-            # Scaling.
-            if scaling:
-                param_vector = dot(scaling_matrix, param_vector)
-
-            # Disassemble the parameter vector.
-            # FIXME pass param_vector
-            self.disassemble_param_vector(model_type, 
param_vector=param_vector, spin=spin, sim_index=sim_index)
-
-            # Monte Carlo minimisation statistics.
-            if sim_index != None:
-                # Sequence specific minimisation statistics.
-                if model_type == 'mf' or model_type == 'local_tm':
-
-                    # Chi-squared statistic.
-                    spin.chi2_sim[sim_index] = self.func
-
-                    # Iterations.
-                    spin.iter_sim[sim_index] = self.iter_count
-
-                    # Function evaluations.
-                    spin.f_count_sim[sim_index] = self.f_count
-
-                    # Gradient evaluations.
-                    spin.g_count_sim[sim_index] = self.g_count
-
-                    # Hessian evaluations.
-                    spin.h_count_sim[sim_index] = self.h_count
-
-                    # Warning.
-                    spin.warning_sim[sim_index] = self.warning
-
-                # Global minimisation statistics.
-                elif model_type == 'diff' or model_type == 'all':
-                    # Chi-squared statistic.
-                    cdp.chi2_sim[sim_index] = func
-
-                    # Iterations.
-                    cdp.iter_sim[sim_index] = iter_count
-
-                    # Function evaluations.
-                    cdp.f_count_sim[sim_index] = f_count
-
-                    # Gradient evaluations.
-                    cdp.g_count_sim[sim_index] = g_count
-
-                    # Hessian evaluations.
-                    cdp.h_count_sim[sim_index] = h_count
-
-                    # Warning.
-                    cdp.warning_sim[sim_index] = warning
-
-            # Normal statistics.
-            else:
-                # Sequence specific minimisation statistics.
-                if model_type == 'mf' or model_type == 'local_tm':
-                    # Chi-squared statistic.
-                    spin.chi2 = self.func
-
-                    # Iterations.
-                    spin.iter = self.iter_count
-
-                    # Function evaluations.
-                    spin.f_count = self.f_count
-
-                    # Gradient evaluations.
-                    spin.g_count = self.g_count
-
-                    # Hessian evaluations.
-                    spin.h_count = self.h_count
-
-                    # Warning.
-                    spin.warning = self.warning
-
-                # Global minimisation statistics.
-                elif model_type == 'diff' or model_type == 'all':
-                    # Chi-squared statistic.
-                    cdp.chi2 = func
-
-                    # Iterations.
-                    cdp.iter = iter_count
-
-                    # Function evaluations.
-                    cdp.f_count = f_count
-
-                    # Gradient evaluations.
-                    cdp.g_count = g_count
-
-                    # Hessian evaluations.
-                    cdp.h_count = h_count
-
-                    # Warning.
-                    cdp.warning = warning
+        #print '***', param_vector, func, iter, fc, gc, hc, warning, spin, 
sim_index, model_type, scaling
+        #self.write_columnar_line(file=sys.stdout)
+        #self.param_vector=param_vector
+
+        #print 'disassembel result'
+        #print 'param_vector', param_vector
+        #print 'func', func
+        #print 'iter', iter
+        #print 'fc', fc
+        #print 'gc', gc
+        #print 'hc', hc
+        #print 'warning', warning
+        #print 'spin', spin
+        #print 'sim_index', sim_index
+        #print ' model_type ', model_type
+        #print 'scaling', scaling
+        #print 'scaling_matrix', scaling_matrix
+        #FIXME this is a fix for old code
+        #self.iter_count = iter
+        #self.f_count = fc
+        #self.g_count = gc
+        #self.h_count = hc
+        #self.run=run
+
+        self.func=func
+        self.warning=warning
+        self.iter_count = self.iter_count + iter
+        self.f_count = self.f_count + fc
+        self.g_count = self.g_count + gc
+        self.h_count = self.h_count + hc
+
+        # Catch infinite chi-squared values.
+        if isInf(func):
+            raise RelaxInfError, 'chi-squared'
+
+        # Catch chi-squared values of NaN.
+        if isNaN(func):
+            raise RelaxNaNError, 'chi-squared'
+
+        # Scaling.
+        if scaling:
+            param_vector = dot(scaling_matrix, param_vector)
+
+        # Disassemble the parameter vector.
+        # FIXME pass param_vector
+        self.disassemble_param_vector(model_type, param_vector=param_vector, 
spin=spin, sim_index=sim_index)
+
+        # Monte Carlo minimisation statistics.
+        if sim_index != None:
+            # Sequence specific minimisation statistics.
+            if model_type == 'mf' or model_type == 'local_tm':
+
+                # Chi-squared statistic.
+                spin.chi2_sim[sim_index] = self.func
+
+                # Iterations.
+                spin.iter_sim[sim_index] = self.iter_count
+
+                # Function evaluations.
+                spin.f_count_sim[sim_index] = self.f_count
+
+                # Gradient evaluations.
+                spin.g_count_sim[sim_index] = self.g_count
+
+                # Hessian evaluations.
+                spin.h_count_sim[sim_index] = self.h_count
+
+                # Warning.
+                spin.warning_sim[sim_index] = self.warning
+
+            # Global minimisation statistics.
+            elif model_type == 'diff' or model_type == 'all':
+                # Chi-squared statistic.
+                cdp.chi2_sim[sim_index] = func
+
+                # Iterations.
+                cdp.iter_sim[sim_index] = iter_count
+
+                # Function evaluations.
+                cdp.f_count_sim[sim_index] = f_count
+
+                # Gradient evaluations.
+                cdp.g_count_sim[sim_index] = g_count
+
+                # Hessian evaluations.
+                cdp.h_count_sim[sim_index] = h_count
+
+                # Warning.
+                cdp.warning_sim[sim_index] = warning
+
+        # Normal statistics.
+        else:
+            # Sequence specific minimisation statistics.
+            if model_type == 'mf' or model_type == 'local_tm':
+                # Chi-squared statistic.
+                spin.chi2 = self.func
+
+                # Iterations.
+                spin.iter = self.iter_count
+
+                # Function evaluations.
+                spin.f_count = self.f_count
+
+                # Gradient evaluations.
+                spin.g_count = self.g_count
+
+                # Hessian evaluations.
+                spin.h_count = self.h_count
+
+                # Warning.
+                spin.warning = self.warning
+
+            # Global minimisation statistics.
+            elif model_type == 'diff' or model_type == 'all':
+                # Chi-squared statistic.
+                cdp.chi2 = func
+
+                # Iterations.
+                cdp.iter = iter_count
+
+                # Function evaluations.
+                cdp.f_count = f_count
+
+                # Gradient evaluations.
+                cdp.g_count = g_count
+
+                # Hessian evaluations.
+                cdp.h_count = h_count
+
+                # Warning.
+                cdp.warning = warning
 
 
     def minimise_data_setup(self, model_type, min_algor, num_data_sets, 
min_options, spin=None, sim_index=None):




Related Messages


Powered by MHonArc, Updated Thu Oct 16 18:00:05 2008