mailr21850 - /trunk/test_suite/system_tests/chemical_shift.py


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

Header


Content

Posted by tlinnet on December 06, 2013 - 19:23:
Author: tlinnet
Date: Fri Dec  6 19:23:58 2013
New Revision: 21850

URL: http://svn.gna.org/viewcvs/relax?rev=21850&view=rev
Log:
Added system test for reading chemical shift from NMRPipe SeriesTab file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
    trunk/test_suite/system_tests/chemical_shift.py

Modified: trunk/test_suite/system_tests/chemical_shift.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/chemical_shift.py?rev=21850&r1=21849&r2=21850&view=diff
==============================================================================
--- trunk/test_suite/system_tests/chemical_shift.py (original)
+++ trunk/test_suite/system_tests/chemical_shift.py Fri Dec  6 19:23:58 2013
@@ -41,6 +41,26 @@
 
         # Create the data pipe.
         self.interpreter.pipe.create('cs', 'mf')
+
+
+    def test_read_nmrpipe_seriestab(self):
+        """Test the reading of chemical shifts from an NMRPipe seriesTab 
peak list."""
+
+        # Read the spins from peak list.
+        self.interpreter.spectrum.read_spins(file="seriesTab.ser", 
dir=status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', dim=1)
+
+        # Read the chemical shift from the list.
+        self.interpreter.chemical_shift.read(file="seriesTab.ser", 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
+
+        # Test the data.
+        cs = [128.374, 127.066, 124.523]
+        i = 0
+        for spin in spin_loop():
+            # Check the shift.
+            self.assertEqual(spin.chemical_shift, cs[i])
+
+            # Increment the index.
+            i += 1
 
 
     def test_read_nmrview(self):




Related Messages


Powered by MHonArc, Updated Fri Dec 06 19:40:01 2013