mailr22214 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py


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

Header


Content

Posted by tlinnet on February 19, 2014 - 17:23:
Author: tlinnet
Date: Wed Feb 19 17:23:35 2014
New Revision: 22214

URL: http://svn.gna.org/viewcvs/relax?rev=22214&view=rev
Log:
Implemented unit test for catching the correct return of 
loop_exp_frq_offset_point_time.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Modified:
    
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

Modified: 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22214&r1=22213&r2=22214&view=diff
==============================================================================
--- 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
(original)
+++ 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
Wed Feb 19 17:23:35 2014
@@ -38,3 +38,31 @@
 
         # Create a dispersion data pipe.
         ds.add(pipe_name='orig', pipe_type='relax_disp')
+
+
+    def test_bug_21665_cpmg_two_fields_two_delaytimes_fail_calc(self):
+        """U{Bug #21665<https://gna.org/bugs/?21665>} catch, the failure due 
to a a CPMG analysis recorded at two fields at two delay times, using 
calc()."""
+
+        # Load the state.
+        statefile = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21665.bz2'
+        state.load_state(statefile, force=True)
+
+        # Original data
+        ncyc_1 = [20, 16, 10, 36, 2, 12, 4, 22, 18, 40, 14, 26, 8, 32, 24, 
6, 28]
+        sfrq_1 = 499.86214*1E6
+        time_T2_1 = 0.04
+        cpmg_1 = [ncyc/time_T2_1 for ncyc in ncyc_1]
+        cpmg_1.sort()
+
+        ncyc_2 = [28, 4, 32, 60, 2, 10, 16, 8, 20, 52, 18, 40, 6, 12, 24, 14]
+        sfrq_2 = 599.8908587*1E6
+        time_T2_2 = 0.06
+        cpmg_2 = [ncyc/time_T2_2 for ncyc in ncyc_2]
+        cpmg_2.sort()
+
+        # Test the loop function.
+        for exp_type, frq, offset, point, time, ei, mi, oi, di, ti in 
loop_exp_frq_offset_point_time(return_indices=True):
+            if frq == sfrq_1:
+                self.assertEqual(time, time_T2_1)
+            if frq == sfrq_2:
+                self.assertEqual(time, time_T2_2)




Related Messages


Powered by MHonArc, Updated Wed Feb 19 17:40:02 2014