mailr2707 - in /1.3/specific_fns: model_free.py relax_data.py


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

Header


Content

Posted by edward . dauvergne on October 31, 2006 - 08:31:
Author: bugman
Date: Tue Oct 31 08:31:08 2006
New Revision: 2707

URL: http://svn.gna.org/viewcvs/relax?rev=2707&view=rev
Log:
Ported r2705 and r2706 from the 1.2 line.

The command used was:
$ svn merge -r2704:2706 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.2

This fixes bug #7583 (https://gna.org/bugs/?7583) and fixes a problem with 
one of the comments in
'specific_fns/model_free.py'.


Modified:
    1.3/specific_fns/model_free.py
    1.3/specific_fns/relax_data.py

Modified: 1.3/specific_fns/model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free.py?rev=2707&r1=2706&r2=2707&view=diff
==============================================================================
--- 1.3/specific_fns/model_free.py (original)
+++ 1.3/specific_fns/model_free.py Tue Oct 31 08:31:08 2006
@@ -2107,7 +2107,10 @@
             num_data_sets = 0
             num_res = 1
 
+
         # Loop over the minimisation instances.
+        #######################################
+        
         for i in xrange(num_instances):
             # Set the residue index.
             if min_algor == 'back_calc':
@@ -2617,7 +2620,7 @@
                 residue.select = 0
                 continue
 
-            # Require at least as many data points as params to prevent 
under-fitting
+            # Require at least as many data points as params to prevent 
over-fitting
             if hasattr(residue, 'params'):
                 if len(residue.params) > len(residue.relax_data):
                     residue.select = 0

Modified: 1.3/specific_fns/relax_data.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/relax_data.py?rev=2707&r1=2706&r2=2707&view=diff
==============================================================================
--- 1.3/specific_fns/relax_data.py (original)
+++ 1.3/specific_fns/relax_data.py Tue Oct 31 08:31:08 2006
@@ -549,6 +549,9 @@
         if self.test_labels(run):
             raise RelaxRiError, (self.ri_label, self.frq_label)
 
+        # Minimum number of columns.
+        min_col_num = max(num_col, name_col, data_col, error_col)
+
         # Extract the data from the file.
         if not file_data:
             # Extract.
@@ -573,7 +576,7 @@
             # Test the validity of the relaxation data.
             for i in xrange(len(file_data)):
                 # Skip missing data.
-                if len(file_data[i]) != 4:
+                if len(file_data[i]) <= min_col_num:
                     continue
 
                 # Test that the data are numbers.
@@ -610,7 +613,7 @@
         # Loop over the relaxation data.
         for i in xrange(len(file_data)):
             # Skip missing data.
-            if len(file_data[i]) != 4:
+            if len(file_data[i]) <= min_col_num:
                 continue
 
             # Convert the data.




Related Messages


Powered by MHonArc, Updated Tue Oct 31 09:00:06 2006