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):


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to