mailr4205 - in /1.2: generic_fns/ maths_fns/ prompt/ sample_scripts/ specific_fns/ test_suite/


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

Header


Content

Posted by sebastien . morin . 1 on December 18, 2007 - 15:43:
Author: semor
Date: Tue Dec 18 15:42:51 2007
New Revision: 4205

URL: http://svn.gna.org/viewcvs/relax?rev=4205&view=rev
Log:
Merging of the 'consistency-tests' branch in the main 1.2 line (take 2).

The commands used were:
svn merge -r3320:4200
 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/consistency_tests_1.2/
svn resolved .

This is the second time the merge of the branch is done. The first attempt 
was erroneous and caused
by a  beginner mistake by Sebastien Morin pointed out in the post by Edward 
d'Auvergne:
https://mail.gna.org/public/relax-devel/2007-12/msg00015.html (Message-id:
<7f080ed10712171508w44f86ee9s813793c246832aeb@xxxxxxxxxxxxxx>

The main 1.2 line now contains all the code for consistency testing.


Added:
    1.2/maths_fns/consistency_tests.py
      - copied unchanged from r4200, 
branches/consistency_tests_1.2/maths_fns/consistency_tests.py
    1.2/prompt/consistency_tests.py
      - copied unchanged from r4200, 
branches/consistency_tests_1.2/prompt/consistency_tests.py
    1.2/sample_scripts/consistency_tests.py
      - copied unchanged from r4200, 
branches/consistency_tests_1.2/sample_scripts/consistency_tests.py
    1.2/specific_fns/consistency_tests.py
      - copied unchanged from r4200, 
branches/consistency_tests_1.2/specific_fns/consistency_tests.py
    1.2/test_suite/consistency_tests.py
      - copied unchanged from r4200, 
branches/consistency_tests_1.2/test_suite/consistency_tests.py
Modified:
    1.2/generic_fns/runs.py
    1.2/prompt/__init__.py
    1.2/prompt/grace.py
    1.2/prompt/interpreter.py
    1.2/prompt/molmol.py
    1.2/prompt/run.py
    1.2/prompt/value.py
    1.2/specific_fns/__init__.py
    1.2/specific_fns/main.py
    1.2/specific_fns/specific_setup.py
    1.2/test_suite/__init__.py
    1.2/test_suite/test_suite.py

Modified: 1.2/generic_fns/runs.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/generic_fns/runs.py?rev=4205&r1=4204&r2=4205&view=diff
==============================================================================
--- 1.2/generic_fns/runs.py (original)
+++ 1.2/generic_fns/runs.py Tue Dec 18 15:42:51 2007
@@ -38,7 +38,7 @@
             raise RelaxRunError, run
 
         # List of valid run types.
-        valid = ['jw', 'mf', 'noe', 'relax_fit', 'srls']
+        valid = ['ct', 'jw', 'mf', 'noe', 'relax_fit', 'srls']
 
         # Test if run_type is valid.
         if not run_type in valid:

Modified: 1.2/prompt/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/prompt/__init__.py?rev=4205&r1=4204&r2=4205&view=diff
==============================================================================
--- 1.2/prompt/__init__.py (original)
+++ 1.2/prompt/__init__.py Tue Dec 18 15:42:51 2007
@@ -22,6 +22,7 @@
 
 
 __all__ = ['angles',
+           'consistency_tests',
            'command',
            'dasha',
            'diffusion_tensor',

Modified: 1.2/prompt/grace.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/prompt/grace.py?rev=4205&r1=4204&r2=4205&view=diff
==============================================================================
--- 1.2/prompt/grace.py (original)
+++ 1.2/prompt/grace.py Tue Dec 18 15:42:51 2007
@@ -25,6 +25,7 @@
 from doc_string import regexp_doc
 import help
 from generic_fns.minimise import Minimise
+from specific_fns.consistency_tests import Consistency_tests
 from specific_fns.model_free import Model_free
 from specific_fns.jw_mapping import Jw_mapping
 from specific_fns.noe import Noe
@@ -258,6 +259,7 @@
 
     # Write function.
     write.__doc__ = write.__doc__ + "\n\n" + regexp_doc() + "\n"
+    write.__doc__ = write.__doc__ + 
Consistency_tests.return_data_name.__doc__ + "\n\n"
     write.__doc__ = write.__doc__ + Minimise.return_data_name.__doc__ + 
"\n\n"
     write.__doc__ = write.__doc__ + Noe.return_data_name.__doc__ + "\n"
     write.__doc__ = write.__doc__ + Relax_fit.return_data_name.__doc__ + "\n"

Modified: 1.2/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/prompt/interpreter.py?rev=4205&r1=4204&r2=4205&view=diff
==============================================================================
--- 1.2/prompt/interpreter.py (original)
+++ 1.2/prompt/interpreter.py Tue Dec 18 15:42:51 2007
@@ -50,6 +50,7 @@
 from pdb import PDB
 
 # User classes.
+from consistency_tests import Consistency_tests
 from dasha import Dasha
 from diffusion_tensor import Diffusion_tensor
 from grace import Grace
@@ -106,6 +107,7 @@
         self._system = system
 
         # Place the user classes into the interpreter class namespace.
+        self._Consistency_tests = Consistency_tests(relax)
         self._Dasha = Dasha(relax)
         self._Diffusion_tensor = Diffusion_tensor(relax)
         self._OpenDX = OpenDX(relax)
@@ -163,6 +165,7 @@
         pdb = self._PDB.pdb
 
         # Place the user classes in the local namespace.
+        consistency_tests = self._Consistency_tests
         dasha = self._Dasha
         diffusion_tensor = self._Diffusion_tensor
         dx = self._OpenDX

Modified: 1.2/prompt/molmol.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/prompt/molmol.py?rev=4205&r1=4204&r2=4205&view=diff
==============================================================================
--- 1.2/prompt/molmol.py (original)
+++ 1.2/prompt/molmol.py Tue Dec 18 15:42:51 2007
@@ -26,6 +26,7 @@
 from doc_string import regexp_doc
 import help
 from generic_fns.minimise import Minimise
+from specific_fns.consistency_tests import Consistency_tests
 from specific_fns.model_free import Molmol
 from specific_fns.jw_mapping import Jw_mapping
 from specific_fns.noe import Noe

Modified: 1.2/prompt/run.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/prompt/run.py?rev=4205&r1=4204&r2=4205&view=diff
==============================================================================
--- 1.2/prompt/run.py (original)
+++ 1.2/prompt/run.py Tue Dec 18 15:42:51 2007
@@ -54,6 +54,7 @@
 
         The run name can be any string however the run type can only be one 
of the following
 
+            'ct':  Consistency tests.
             'jw':  Reduced spectral density mapping,
             'mf':  Model-free analysis,
             'noe':  Steady state NOE calculation,

Modified: 1.2/prompt/value.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/prompt/value.py?rev=4205&r1=4204&r2=4205&view=diff
==============================================================================
--- 1.2/prompt/value.py (original)
+++ 1.2/prompt/value.py Tue Dec 18 15:42:51 2007
@@ -25,6 +25,7 @@
 from doc_string import regexp_doc
 import help
 from generic_fns.diffusion_tensor import Diffusion_tensor
+from specific_fns.consistency_tests import Consistency_tests
 from specific_fns.model_free import Model_free
 from specific_fns.jw_mapping import Jw_mapping
 from specific_fns.relax_fit import Relax_fit
@@ -510,6 +511,8 @@
 
     # Copy function.
     copy.__doc__ = copy.__doc__ + "\n\n" + regexp_doc() + "\n"
+    copy.__doc__ = copy.__doc__ + Consistency_tests.set.__doc__ + "\n"
+    copy.__doc__ = copy.__doc__ + Consistency_tests.return_data_name.__doc__ 
+ "\n"
     copy.__doc__ = copy.__doc__ + Model_free.set_doc.__doc__ + "\n\n"
     copy.__doc__ = copy.__doc__ + Model_free.return_data_name.__doc__ + "\n"
     copy.__doc__ = copy.__doc__ + Jw_mapping.set.__doc__ + "\n"
@@ -519,12 +522,15 @@
 
     # Display function.
     display.__doc__ = display.__doc__ + "\n\n" + regexp_doc() + "\n"
+    display.__doc__ = display.__doc__ + 
Consistency_tests.return_data_name.__doc__ + "\n"
     display.__doc__ = display.__doc__ + Model_free.return_data_name.__doc__ 
+ "\n\n"
     display.__doc__ = display.__doc__ + Jw_mapping.return_data_name.__doc__ 
+ "\n"
     display.__doc__ = display.__doc__ + Relax_fit.return_data_name.__doc__ + 
"\n"
 
     # Read function.
     read.__doc__ = read.__doc__ + "\n\n" + regexp_doc() + "\n"
+    read.__doc__ = read.__doc__ + Consistency_tests.set.__doc__ + "\n"
+    read.__doc__ = read.__doc__ + Consistency_tests.return_data_name.__doc__ 
+ "\n"
     read.__doc__ = read.__doc__ + Model_free.set_doc.__doc__ + "\n\n"
     read.__doc__ = read.__doc__ + Model_free.return_data_name.__doc__ + "\n"
     read.__doc__ = read.__doc__ + Jw_mapping.set.__doc__ + "\n"
@@ -534,6 +540,9 @@
 
     # Set function.
     set.__doc__ = set.__doc__ + "\n\n" + regexp_doc() + "\n"
+    set.__doc__ = set.__doc__ + Consistency_tests.set.__doc__ + "\n"
+    set.__doc__ = set.__doc__ + Consistency_tests.return_data_name.__doc__ + 
"\n"
+    set.__doc__ = set.__doc__ + Consistency_tests.default_value.__doc__ + 
"\n"
     set.__doc__ = set.__doc__ + Model_free.set_doc.__doc__ + "\n"
     set.__doc__ = set.__doc__ + Model_free.return_data_name.__doc__ + "\n"
     set.__doc__ = set.__doc__ + Model_free.default_value.__doc__ + "\n\n"
@@ -549,6 +558,7 @@
 
     # Write function.
     write.__doc__ = write.__doc__ + "\n\n" + regexp_doc() + "\n"
+    write.__doc__ = write.__doc__ + 
Consistency_tests.return_data_name.__doc__ + "\n\n"
     write.__doc__ = write.__doc__ + Model_free.return_data_name.__doc__ + 
"\n\n"
     write.__doc__ = write.__doc__ + Jw_mapping.return_data_name.__doc__ + 
"\n\n"
     write.__doc__ = write.__doc__ + Noe.return_data_name.__doc__ + "\n"

Modified: 1.2/specific_fns/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/specific_fns/__init__.py?rev=4205&r1=4204&r2=4205&view=diff
==============================================================================
--- 1.2/specific_fns/__init__.py (original)
+++ 1.2/specific_fns/__init__.py Tue Dec 18 15:42:51 2007
@@ -21,7 +21,8 @@
 
###############################################################################
 
 
-__all__ = [ 'base_class',
+__all__ = [ 'consistency_tests',
+            'base_class',
             'hybrid',
             'jw_mapping',
             'main',

Modified: 1.2/specific_fns/main.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/specific_fns/main.py?rev=4205&r1=4204&r2=4205&view=diff
==============================================================================
--- 1.2/specific_fns/main.py (original)
+++ 1.2/specific_fns/main.py Tue Dec 18 15:42:51 2007
@@ -21,6 +21,7 @@
 
###############################################################################
 
 
+from consistency_tests import Consistency_tests
 from hybrid import Hybrid
 from jw_mapping import Jw_mapping
 from model_free import Model_free
@@ -37,6 +38,7 @@
         self.relax = relax
 
         # Set up all the functions
+        self.consistency_tests = Consistency_tests(self.relax)
         self.hybrid = Hybrid(self.relax)
         self.jw_mapping = Jw_mapping(self.relax)
         self.model_free = Model_free(self.relax)

Modified: 1.2/specific_fns/specific_setup.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/specific_fns/specific_setup.py?rev=4205&r1=4204&r2=4205&view=diff
==============================================================================
--- 1.2/specific_fns/specific_setup.py (original)
+++ 1.2/specific_fns/specific_setup.py Tue Dec 18 15:42:51 2007
@@ -37,6 +37,10 @@
         # Initialise.
         string = "this analysis"
 
+        # Consistency testing.
+        if function_type == 'ct':
+            string = "consistency testing"
+
         # NOE calculation.
         if function_type == 'noe':
             string = "NOE calculations"
@@ -69,6 +73,10 @@
 
         # Get the function.
         try:
+            # Consistency testing.            
+            if function_type == 'ct':
+                function = self.ct_funcs()
+
             # NOE calculation.
             if function_type == 'noe':
                 function = self.noe()
@@ -205,6 +213,86 @@
         # Write results function (Columnar format).
         if self.eqi == 'write_columnar_results':
             return self.relax.specific.jw_mapping.write_columnar_results
+
+
+    def ct_funcs(self):
+        """Consistency testing functions."""
+
+        # Calculate function.
+        if self.eqi == 'calculate':
+            return self.relax.specific.consistency_tests.calculate
+
+        # Copy function.
+        if self.eqi == 'copy':
+            return self.relax.specific.consistency_tests.copy
+
+        # Create Monte Carlo data function (same as data returning function).
+        if self.eqi == 'create_mc_data':
+            return self.relax.specific.consistency_tests.return_data
+
+        # Number of instances.
+        if self.eqi == 'num_instances':
+            return self.relax.specific.consistency_tests.num_instances
+
+        # Overfit deselect.
+        if self.eqi == 'overfit_deselect':
+            return self.relax.specific.consistency_tests.overfit_deselect
+
+        # Pack Monte Carlo simulation data function.
+        if self.eqi == 'pack_sim_data':
+            return self.relax.specific.consistency_tests.sim_pack_data
+
+        # Data returning function.
+        if self.eqi == 'return_data':
+            return self.relax.specific.consistency_tests.return_data
+
+        # Data or parameter name returning function.
+        if self.eqi == 'return_data_name':
+            return self.relax.specific.consistency_tests.return_data_name
+
+        # Factor of conversion between different parameter units returning 
function.
+        if self.eqi == 'return_conversion_factor':
+            return 
self.relax.specific.consistency_tests.return_conversion_factor
+
+        # Data error returning function.
+        if self.eqi == 'return_error':
+            return self.relax.specific.consistency_tests.return_error
+
+        # Grace string returning function.
+        if self.eqi == 'return_grace_string':
+            return self.relax.specific.consistency_tests.return_grace_string
+
+        # Simulation parameter array returning function.
+        if self.eqi == 'return_sim_param':
+            return self.relax.specific.consistency_tests.sim_return_param
+
+        # Simulation parameter array returning function.
+        if self.eqi == 'return_selected_sim':
+            return self.relax.specific.consistency_tests.sim_return_selected
+
+        # String of the external parameter units returning function.
+        if self.eqi == 'return_units':
+            return self.relax.specific.consistency_tests.return_units
+
+        # Value and error returning function.
+        if self.eqi == 'return_value':
+            return self.relax.specific.consistency_tests.return_value
+
+        # Set function.
+        if self.eqi == 'set':
+            return self.relax.specific.consistency_tests.set
+
+        # Set error function.
+        if self.eqi == 'set_error':
+            return self.relax.specific.consistency_tests.set_error
+
+        # Set error function.
+        if self.eqi == 'set_selected_sim':
+            return self.relax.specific.consistency_tests.set_selected_sim
+
+        # Write results function (Columnar format).
+        if self.eqi == 'write_columnar_results':
+            return 
self.relax.specific.consistency_tests.write_columnar_results
 
 
     def mf_funcs(self):

Modified: 1.2/test_suite/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/test_suite/__init__.py?rev=4205&r1=4204&r2=4205&view=diff
==============================================================================
--- 1.2/test_suite/__init__.py (original)
+++ 1.2/test_suite/__init__.py Tue Dec 18 15:42:51 2007
@@ -22,6 +22,7 @@
 
 
 __all__ = ['test_suite',
+           'consistency_tests',
            'diffusion_tensor',
            'generic.py',
            'jw_mapping',

Modified: 1.2/test_suite/test_suite.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/test_suite/test_suite.py?rev=4205&r1=4204&r2=4205&view=diff
==============================================================================
--- 1.2/test_suite/test_suite.py (original)
+++ 1.2/test_suite/test_suite.py Tue Dec 18 15:42:51 2007
@@ -27,6 +27,7 @@
 
 # Import the tests.
 from angles import Angles
+from consistency_tests import Consistent
 from diffusion_tensor import Diffusion_tensor
 from generic import Generic
 from jw_mapping import Jw
@@ -192,6 +193,23 @@
         self.exec_tests(self.jw_test_array)
 
 
+        # Consistency tests tests.
+        ##########################
+
+        # Heading
+        self.heading("The consistency tests tests")
+
+        # Initialise the array containing each test element.
+        self.consistent_test_array = []
+
+        # User function value.set() test.
+        self.consistent_test_array.append(Consistent(self.relax, 'set'))
+        self.consistent_test_array.append(Consistent(self.relax, 'calc'))
+
+        # Execute the tests.
+        self.exec_tests(self.consistent_test_array)
+
+
         # Model selection tests.
         ########################
 
@@ -404,6 +422,21 @@
             self.summary_line(test)
 
 
+        # Consistentcy tests test.
+        ##########################
+
+        # Heading.
+        sys.stdout.write("\nThe consistency tests tests:\n")
+
+        # Loop over the tests.
+        for test in self.consistent_test_array:
+            # Synopsis.
+            global_pass = global_pass and test.passed
+
+            # Print the summary line.
+            self.summary_line(test)
+
+
         # Model selection tests.
         ########################
 




Related Messages


Powered by MHonArc, Updated Tue Dec 18 16:00:23 2007