mailr24885 - /branches/r1rho_plotting/test_suite/system_tests/relax_disp.py


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

Header


Content

Posted by tlinnet on July 31, 2014 - 17:22:
Author: tlinnet
Date: Thu Jul 31 17:22:29 2014
New Revision: 24885

URL: http://svn.gna.org/viewcvs/relax?rev=24885&view=rev
Log:
Added systemtest Relax_disp.test_kteilum_fmpoulsen_makke_check_graphs to 
check all CPMG graph combinations of:

y_axis_types = [Y_AXIS_R2_EFF, Y_AXIS_R2_R1RHO]
x_axis_types = [X_AXIS_DISP, X_AXIS_THETA, X_AXIS_W_EFF]
interpolate_types = [INTERPOLATE_DISP]

This is a total of 6 graphs.

The graphs will in most cases be totally equal, since the theta angle is 
calculated to 90 degrees, and R1 is returned as 0.0, then
R2=(R1rho - R1 cos^2(theta)) / sin^2(theta) = R1rho = R2eff for CPMG models.

sr #3124(https://gna.org/support/?3124): Grace graphs production for R1rho 
analysis with R2_eff as function of Omega_eff.
sr #3138(https://gna.org/support/?3138): Interpolating theta through 
spin-lock offset [Omega], rather than spin-lock field strength [w1].

Modified:
    branches/r1rho_plotting/test_suite/system_tests/relax_disp.py

Modified: branches/r1rho_plotting/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/r1rho_plotting/test_suite/system_tests/relax_disp.py?rev=24885&r1=24884&r2=24885&view=diff
==============================================================================
--- branches/r1rho_plotting/test_suite/system_tests/relax_disp.py       
(original)
+++ branches/r1rho_plotting/test_suite/system_tests/relax_disp.py       Thu 
Jul 31 17:22:29 2014
@@ -4148,7 +4148,7 @@
         # Start testing all possible combinations of graphs.
         y_axis_types = [Y_AXIS_R2_EFF, Y_AXIS_R2_R1RHO]
         x_axis_types = [X_AXIS_DISP, X_AXIS_THETA, X_AXIS_W_EFF]
-        interpolate_types = [INTERPOLATE_DISP, INTERPOLATE_OFFSET]
+        interpolate_types = [INTERPOLATE_DISP]
 
         # Write to temp folder.
         result_dir_name = ds.tmpdir
@@ -4186,26 +4186,27 @@
                         file_prod.close()
 
                         # Define file to compare against.
-                        #dir_comp = data_path+sep+result_folder
-                        #file_path_comp = get_file_path(file_name, dir_comp)
-                        #file_comp = open(file_path_comp)
-                        #lines_comp = file_comp.readlines()
-                        #file_comp.close()
+                        dir_comp = data_path+sep+result_folder
+                        file_path_comp = get_file_path(file_name, dir_comp)
+                        file_comp = open(file_path_comp)
+                        lines_comp = file_comp.readlines()
+                        file_comp.close()
 
                         ## Assert number of lines is equal.
-                        #self.assertEqual(len(lines_prod), len(lines_comp))
-                        #for j in range(len(lines_prod)):
-                        #    # Make the string test
-                        #    first_char = lines_prod[j][0]
-                        #    if first_char in ["@", "&"]:
-                        #        self.assertEqual(lines_prod[j], 
lines_comp[j])
-                        #    else:
-                        #        # Split string in x, y, error.
-                        #        # The error would change per run.
-                        #        x_prod, y_prod, y_prod_err = 
lines_prod[j].split()
-                        #        x_comp, y_comp, y_comp_err = 
lines_comp[j].split()
-                        #        self.assertAlmostEqual(float(x_prod), 
float(x_comp))
-                        #        self.assertAlmostEqual(float(y_prod), 
float(y_comp))
+                        self.assertEqual(len(lines_prod), len(lines_comp))
+                        for j in range(len(lines_prod)):
+                            # Make the string test
+                            first_char = lines_prod[j][0]
+                            if first_char in ["@", "&"]:
+                                self.assertEqual(lines_prod[j], 
lines_comp[j])
+                            else:
+                                # Split string in x, y, error.
+                                # The error would change per run.
+                                x_prod, y_prod, y_prod_err = 
lines_prod[j].split()
+                                x_comp, y_comp, y_comp_err = 
lines_comp[j].split()
+                                self.assertAlmostEqual(float(x_prod), 
float(x_comp))
+                                self.assertAlmostEqual(float(y_prod), 
float(y_comp))
+                                self.assertAlmostEqual(float(y_prod_err), 
float(y_comp_err))
 
 
     def test_kteilum_fmpoulsen_makke_cpmg_data_048m_guhcl_to_cr72(self):




Related Messages


Powered by MHonArc, Updated Fri Aug 01 00:00:03 2014