mailr26806 - /branches/nmrglue/test_suite/system_tests/nmrglue.py


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

Header


Content

Posted by tlinnet on November 28, 2014 - 14:31:
Author: tlinnet
Date: Fri Nov 28 14:31:56 2014
New Revision: 26806

URL: http://svn.gna.org/viewcvs/relax?rev=26806&view=rev
Log:
Added initial systemtest Nmrglue.xtest_plot_hist_cpmg to plot histogram of 
intensities.

This is dominated by the noise measurements.

Task #7873 (https://gna.org/task/index.php?7873): Write wrapper function to 
nmrglue, to read .ft2 files and process them.
Homepage: http://www.nmrglue.com/
Link to nmrglue discussion: 
https://groups.google.com/forum/#!forum/nmrglue-discuss
The code is develop at Github: https://github.com/jjhelmus/nmrglue/
Google code: https://code.google.com/p/nmrglue/
Documentation: http://nmrglue.readthedocs.org/en/latest/index.html

Modified:
    branches/nmrglue/test_suite/system_tests/nmrglue.py

Modified: branches/nmrglue/test_suite/system_tests/nmrglue.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/nmrglue/test_suite/system_tests/nmrglue.py?rev=26806&r1=26805&r2=26806&view=diff
==============================================================================
--- branches/nmrglue/test_suite/system_tests/nmrglue.py (original)
+++ branches/nmrglue/test_suite/system_tests/nmrglue.py Fri Nov 28 14:31:56 
2014
@@ -27,7 +27,7 @@
 # relax module imports.
 from data_store import Relax_data_store; ds = Relax_data_store()
 from lib.io import file_root
-from pipe_control.nmrglue import plot_contour
+from pipe_control.nmrglue import plot_contour, plot_hist
 from status import Status; status = Status()
 from test_suite.system_tests.base_classes import SystemTestCase
 from extern import nmrglue
@@ -138,4 +138,31 @@
 
         # Now show
         import matplotlib.pyplot as plt
-        plt.show()
+        plt.show()
+
+
+    def xtest_plot_hist_cpmg(self):
+        """Test the plot_hist function in pipe_control.
+
+        The data is from systemtest -s Relax_disp.test_repeat_cpmg
+        U{task #7826<https://gna.org/task/index.php?7826>}. Write an python 
class for the repeated analysis of dispersion data.
+        """
+
+        # Define base path to files.
+        base_path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'repeated_analysis'+sep+'SOD1'
+
+        # Define folder to all ft files.
+        ft2_folder_1 = base_path +sep+ 'cpmg_disp_sod1d90a_060518' +sep+ 
'cpmg_disp_sod1d90a_060518_normal.fid' +sep+ 'ft2_data'
+
+        # Read the spectrum.
+        fname = '128_0_FT.ft2'
+        sp_id = file_root(fname)
+        self.interpreter.spectrum.nmrglue_read(file=fname, dir=ft2_folder_1, 
spectrum_id=sp_id)
+
+        # Extract the data.
+        dic = cdp.ngdata[sp_id].dic
+        udic = cdp.ngdata[sp_id].udic
+        data = cdp.ngdata[sp_id].data
+
+        # Plot the histogram.
+        plot_hist(ndarray=data, show=True)




Related Messages


Powered by MHonArc, Updated Fri Nov 28 14:40:01 2014