mailr15261 - in /branches/inversion-recovery: ./ generic_fns/ specific_fns/ specific_fns/model_free/ test_suite/system_tests/


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

Header


Content

Posted by edward on January 26, 2012 - 11:26:
Author: bugman
Date: Thu Jan 26 11:26:15 2012
New Revision: 15261

URL: http://svn.gna.org/viewcvs/relax?rev=15261&view=rev
Log:
Merged revisions 15254-15258 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3

........
  r15254 | bugman | 2012-01-26 08:48:20 +0100 (Thu, 26 Jan 2012) | 5 lines
  
  Bug fix for the consistency testing analysis for when relaxation data of 
None is encountered.
  
  This matches the changes of r15247 for the J(w) mapping analysis.
........
  r15255 | bugman | 2012-01-26 10:32:55 +0100 (Thu, 26 Jan 2012) | 8 lines
  
  Big bugfix for the value.read user function.
  
  This is for bug #19332 (https://gna.org/bugs/?19332).
  
  The problem was that the wrong spin ID string was being used to set the 
parameter value so that
  all spins have the same value set for the parameter.
........
  r15256 | bugman | 2012-01-26 10:43:07 +0100 (Thu, 26 Jan 2012) | 6 lines
  
  Fixes for the Dasha use functions for file creation and data extraction.
  
  This should now handle relaxation data values of None, and also set the 
parameter values of
  deselected spins using the Dasha output files.
........
  r15257 | bugman | 2012-01-26 10:44:26 +0100 (Thu, 26 Jan 2012) | 5 lines
  
  Fixes for the Dasha system test for the bug #19332 fix 
(https://gna.org/bugs/?19332).
  
  The parameter values should be different for each spin!  And the chi2 value 
is spin specific.
........
  r15258 | bugman | 2012-01-26 11:24:42 +0100 (Thu, 26 Jan 2012) | 6 lines
  
  Bug fix for the model-free analysis for when relaxation data of None is 
encountered.
  
  This matches the changes of r15247 for the J(w) mapping analysis.  This bug 
would rarely be
  encountered.
........

Modified:
    branches/inversion-recovery/   (props changed)
    branches/inversion-recovery/generic_fns/dasha.py
    branches/inversion-recovery/generic_fns/value.py
    branches/inversion-recovery/specific_fns/consistency_tests.py
    branches/inversion-recovery/specific_fns/model_free/main.py
    branches/inversion-recovery/test_suite/system_tests/dasha.py

Propchange: branches/inversion-recovery/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jan 26 11:26:15 2012
@@ -1,1 +1,1 @@
-/1.3:1-15249
+/1.3:1-15259

Modified: branches/inversion-recovery/generic_fns/dasha.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/inversion-recovery/generic_fns/dasha.py?rev=15261&r1=15260&r2=15261&view=diff
==============================================================================
--- branches/inversion-recovery/generic_fns/dasha.py (original)
+++ branches/inversion-recovery/generic_fns/dasha.py Thu Jan 26 11:26:15 2012
@@ -254,7 +254,7 @@
                 continue
 
             # Skip and deselect spins for which relaxation data is missing.
-            if len(spin.ri_data) != len(cdp.ri_ids):
+            if len(spin.ri_data) != len(cdp.ri_ids) or spin.ri_data[ri_id] 
== None:
                 spin.select = False
                 continue
 
@@ -479,12 +479,8 @@
         # Set the values.
         value.read(param=param, scaling=scaling, file=file_name, 
res_num_col=1, res_name_col=None, data_col=2, error_col=3)
 
-        # Clean up of non-existant parameters (set the parameter to None!).
+        # Clean up of non-existent parameters (set the parameter to None!).
         for spin in spin_loop():
-            # Skip deselected spins.
-            if not spin.select:
-                continue
-
             # Skip the spin (don't set the parameter to None) if the 
parameter exists in the model.
             if param in spin.params:
                 continue

Modified: branches/inversion-recovery/generic_fns/value.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/inversion-recovery/generic_fns/value.py?rev=15261&r1=15260&r2=15261&view=diff
==============================================================================
--- branches/inversion-recovery/generic_fns/value.py (original)
+++ branches/inversion-recovery/generic_fns/value.py Thu Jan 26 11:26:15 2012
@@ -200,31 +200,21 @@
     @type scaling:          float
     @keyword file:          The name of the file to open.
     @type file:             str
-    @keyword dir:           The directory containing the file (defaults to 
the current directory if
-                            None).
+    @keyword dir:           The directory containing the file (defaults to 
the current directory if None).
     @type dir:              str or None
-    @keyword file_data:     An alternative to opening a file, if the data 
already exists in the
-                            correct format.  The format is a list of lists 
where the first index
-                            corresponds to the row and the second the column.
+    @keyword file_data:     An alternative to opening a file, if the data 
already exists in the correct format.  The format is a list of lists where 
the first index corresponds to the row and the second the column.
     @type file_data:        list of lists
-    @keyword spin_id_col:   The column containing the spin ID strings.  If 
supplied, the
-                            mol_name_col, res_name_col, res_num_col, 
spin_name_col, and spin_num_col
-                            arguments must be none.
+    @keyword spin_id_col:   The column containing the spin ID strings.  If 
supplied, the mol_name_col, res_name_col, res_num_col, spin_name_col, and 
spin_num_col arguments must be none.
     @type spin_id_col:      int or None
-    @keyword mol_name_col:  The column containing the molecule name 
information.  If supplied,
-                            spin_id_col must be None.
+    @keyword mol_name_col:  The column containing the molecule name 
information.  If supplied, spin_id_col must be None.
     @type mol_name_col:     int or None
-    @keyword res_name_col:  The column containing the residue name 
information.  If supplied,
-                            spin_id_col must be None.
+    @keyword res_name_col:  The column containing the residue name 
information.  If supplied, spin_id_col must be None.
     @type res_name_col:     int or None
-    @keyword res_num_col:   The column containing the residue number 
information.  If supplied,
-                            spin_id_col must be None.
+    @keyword res_num_col:   The column containing the residue number 
information.  If supplied, spin_id_col must be None.
     @type res_num_col:      int or None
-    @keyword spin_name_col: The column containing the spin name information. 
 If supplied,
-                            spin_id_col must be None.
+    @keyword spin_name_col: The column containing the spin name information. 
 If supplied, spin_id_col must be None.
     @type spin_name_col:    int or None
-    @keyword spin_num_col:  The column containing the spin number 
information.  If supplied,
-                            spin_id_col must be None.
+    @keyword spin_num_col:  The column containing the spin number 
information.  If supplied, spin_id_col must be None.
     @type spin_num_col:     int or None
     @keyword data_col:      The column containing the RDC data in Hz.
     @type data_col:         int or None
@@ -289,7 +279,7 @@
             id, error = data
 
         # Set the value.
-        set_fn(val=value, error=error, param=param, spin_id=spin_id)
+        set_fn(val=value, error=error, param=param, spin_id=id)
 
     # Reset the minimisation statistics.
     if not min_stat:

Modified: branches/inversion-recovery/specific_fns/consistency_tests.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/inversion-recovery/specific_fns/consistency_tests.py?rev=15261&r1=15260&r2=15261&view=diff
==============================================================================
--- branches/inversion-recovery/specific_fns/consistency_tests.py (original)
+++ branches/inversion-recovery/specific_fns/consistency_tests.py Thu Jan 26 
11:26:15 2012
@@ -336,9 +336,17 @@
                 spin.select = False
 
             # Require 3 or more data points.
-            elif len(spin.ri_data) < 3:
-                warn(RelaxDeselectWarning(spin_id, 'insufficient relaxation 
data, 3 or more data points are required'))
-                spin.select = False
+            else:
+                # Count the points.
+                data_points = 0
+                for id in cdp.ri_ids:
+                    if spin.ri_data.has_key(id) and spin.ri_data[id] != None:
+                        data_points += 1
+
+                # Not enough.
+                if data_points < 3:
+                    warn(RelaxDeselectWarning(spin_id, 'insufficient 
relaxation data, 3 or more data points are required'))
+                    spin.select = False
 
 
     return_data_name_doc = """

Modified: branches/inversion-recovery/specific_fns/model_free/main.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/inversion-recovery/specific_fns/model_free/main.py?rev=15261&r1=15260&r2=15261&view=diff
==============================================================================
--- branches/inversion-recovery/specific_fns/model_free/main.py (original)
+++ branches/inversion-recovery/specific_fns/model_free/main.py Thu Jan 26 
11:26:15 2012
@@ -2045,18 +2045,25 @@
             if not spin.select:
                 continue
 
+            # The number of relaxation data points.
+            data_points = 0
+            if hasattr(cdp, 'ri_ids') and hasattr(spin, 'ri_data'):
+                for id in cdp.ri_ids:
+                    if spin.ri_data.has_key(id) and spin.ri_data[id] != None:
+                        data_points += 1
+
             # Relaxation data must exist!
             if not hasattr(spin, 'ri_data'):
                 warn(RelaxDeselectWarning(spin_id, 'missing relaxation 
data'))
                 spin.select = False
 
             # Require 3 or more relaxation data points.
-            elif len(spin.ri_data) < 3:
+            elif data_points < 3:
                 warn(RelaxDeselectWarning(spin_id, 'insufficient relaxation 
data, 3 or more data points are required'))
                 spin.select = False
 
             # Require at least as many data points as params to prevent 
over-fitting.
-            elif hasattr(spin, 'params') and spin.params and 
len(spin.params) > len(spin.ri_data):
+            elif hasattr(spin, 'params') and spin.params and 
len(spin.params) > data_points:
                 warn(RelaxDeselectWarning(spin_id, 'over-fitting - more 
parameters than data points'))
                 spin.select = False
 

Modified: branches/inversion-recovery/test_suite/system_tests/dasha.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/inversion-recovery/test_suite/system_tests/dasha.py?rev=15261&r1=15260&r2=15261&view=diff
==============================================================================
--- branches/inversion-recovery/test_suite/system_tests/dasha.py (original)
+++ branches/inversion-recovery/test_suite/system_tests/dasha.py Thu Jan 26 
11:26:15 2012
@@ -60,7 +60,6 @@
         self.interpreter.run(script_file=status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'dasha.py')
 
         # Check the global data.
-        self.assertEqual(cdp.chi2, 0.63673000000000002)
         self.assertEqual(len(cdp.ri_ids), 3)
         for ri_id in cdp.ri_ids:
             self.assertEqual(cdp.frq[ri_id], 600000000.0)
@@ -69,33 +68,35 @@
         self.assertEqual(cdp.ri_type['NOE_600'], 'NOE')
 
         # The spin data.
-        select = [True, True, False]
-        fixed = [None, None, None]
-        proton_type = [None, None, None]
-        heteronuc_type = ['15N', '15N', '15N']
-        attached_proton = [None, None, None]
-        nucleus = [None, None, None]
-        model = ['m3', 'm3', 'm3']
-        equation = ['mf_orig', 'mf_orig', 'mf_orig']
-        params = [['s2', 'rex'], ['s2', 'rex'], ['s2', 'rex']]
-        xh_vect = [None, None, None]
-        s2 = [0.64359, 0.64359, 0.64359]
-        s2f = [None, None, 0.8]
-        s2s = [None, None, 0.8]
-        local_tm = [None, None, None]
-        te = [None, None, 0.01]
-        tf = [None, None, 0.001]
-        ts = [None, None, 0.1]
-        rex = [4.29432, 4.29432, 4.29432]
-        r = [1.02e-10, 1.02e-10, 1.02e-10]
-        csa = [-172e-6, -172e-6, -172e-6]
-        chi2 = [None, None, None]
+        select = [True, True, False, False]
+        fixed = [None, None, None, None]
+        proton_type = [None, None, None, None]
+        heteronuc_type = ['15N', '15N', '15N', '15N']
+        attached_proton = [None, None, None, None]
+        nucleus = [None, None, None, None]
+        model = ['m3', 'm3', 'm3', 'm3']
+        equation = ['mf_orig', 'mf_orig', 'mf_orig', 'mf_orig']
+        params = [['s2', 'rex'], ['s2', 'rex'], ['s2', 'rex'], ['s2', 'rex']]
+        xh_vect = [None, None, None, None]
+        s2 = [0.71510, 0.64359, None, None]
+        s2f = [None, None, None, None]
+        s2s = [None, None, None, None]
+        local_tm = [None, None, None, None]
+        te = [None, None, None, None]
+        tf = [None, None, None, None]
+        ts = [None, None, None, None]
+        rex = [4.32701, 4.29432, None, None]
+        r = [1.02e-10, 1.02e-10, 1.02e-10, 1.02e-10]
+        csa = [-172e-6, -172e-6, -172e-6, -172e-6]
+        chi2 = [1.9657, 0.63673, None, None]
         ri_data = [{'R1_600': 1.0, 'R2_600': 15.0, 'NOE_600': 0.9},
                    {'R1_600': 0.9, 'R2_600': 13.9, 'NOE_600': 0.79},
-                   {'R2_600': 12.0, 'NOE_600': 0.6}]
+                   {'R2_600': 12.0, 'NOE_600': 0.6},
+                   {'R1_600': None, 'R2_600': None, 'NOE_600': None}]
         ri_data_err = [{'R1_600': 0.05, 'R2_600': 0.5, 'NOE_600': 0.05},
                        {'R1_600': 0.05, 'R2_600': 0.8, 'NOE_600': 0.05},
-                       {'R2_600': 0.5, 'NOE_600': 0.05}]
+                       {'R2_600': 0.5, 'NOE_600': 0.05},
+                       {'R1_600': None, 'R2_600': None, 'NOE_600': None}]
 
         # Check the spin data.
         i = 0




Related Messages


Powered by MHonArc, Updated Thu Jan 26 11:40:02 2012