mailr22325 - /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 26, 2014 - 11:10:
Author: tlinnet
Date: Wed Feb 26 11:10:18 2014
New Revision: 22325

URL: http://svn.gna.org/viewcvs/relax?rev=22325&view=rev
Log:
Added unit test for loop_time() for r1rho setup.

Regarding bug #21344, (https://gna.org/bugs/index.php?21344) - Handling of in 
sparse acquired R1rho dataset with missing combinations of time and spin-lock 
field strengths.

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=22325&r1=22324&r2=22325&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 26 11:10:18 2014
@@ -529,3 +529,28 @@
         self.assertEqual(count_frq, 2)
 
 
+    def test_loop_time_r1rho(self):
+        """Unit test of the loop_time() function for R1rho setup.
+
+        This uses the data of the saved state attached to U{bug 
#21344<https://gna.org/bugs/?21344>}.
+        """
+
+        # Load the state.
+        statefile = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21344.bz2'
+        state.load_state(statefile, force=True)
+
+        # Original data, list of time points
+        times_list = [0.0, 0.04, 0.1, 0.14, 0.2, 0.4]
+
+
+        # Check the number of iterations.
+        print("Checking the number of iterations of the loop.")
+        count_frq = 0
+        frq = 799777399.1
+
+        for time, ti in loop_time(frq=frq, return_indices=True):
+            print(time, ti)
+            count_frq += 1
+        self.assertEqual(count_frq, len(times_list))
+
+




Related Messages


Powered by MHonArc, Updated Wed Feb 26 11:20:02 2014