mailr27021 - /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 December 08, 2014 - 17:24:
Author: tlinnet
Date: Mon Dec  8 17:24:39 2014
New Revision: 27021

URL: http://svn.gna.org/viewcvs/relax?rev=27021&view=rev
Log:
For the systemtest Nmrglue.plot_plot_correlation, added the linear 
correlation of the intensities.

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=27021&r1=27020&r2=27021&view=diff
==============================================================================
--- branches/nmrglue/test_suite/system_tests/nmrglue.py (original)
+++ branches/nmrglue/test_suite/system_tests/nmrglue.py Mon Dec  8 17:24:39 
2014
@@ -31,6 +31,7 @@
 import dep_check
 from lib.errors import RelaxError
 from lib.io import file_root, get_file_list
+from lib.statistics import linear_corr, linear_corr_intercept
 from pipe_control.nmrglue import plot_contour, plot_hist
 from status import Status; status = Status()
 from test_suite.system_tests.base_classes import SystemTestCase
@@ -282,6 +283,14 @@
         ax.plot(np_arr_ref, np_arr_met, '+', label='corr')
         ax.plot(line, line, 'r-', label='corr')
 
+        # Try get the linear correlation
+        a, r_xy = linear_corr(x=np_arr_ref, y=np_arr_met)
+        print(a, r_xy)
+        a_int, b_int, r_xy_int = linear_corr_intercept(x=np_arr_ref, 
y=np_arr_met)
+        print(a_int, r_xy, b_int)
+
+        ax.plot(np_arr_ref, np_arr_ref*a, 'g-', label='corr')
+
         # Set text.
         ax.set_xlabel("All spectrum intensities for reference")
         ax.set_ylabel("All spectrum intensities for method")




Related Messages


Powered by MHonArc, Updated Mon Dec 08 18:00:02 2014