mailr27232 - in /branches/frame_order_cleanup: ./ test_suite/shared_data/dispersion/ test_suite/system_tests/


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

Header


Content

Posted by edward on January 20, 2015 - 14:01:
Author: bugman
Date: Tue Jan 20 14:01:49 2015
New Revision: 27232

URL: http://svn.gna.org/viewcvs/relax?rev=27232&view=rev
Log:
Merged revisions 27159-27161 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r27159 | tlinnet | 2015-01-14 14:45:17 +0100 (Wed, 14 Jan 2015) | 3 lines
  
  Added save state for test of bug 23186.
  
  Bug #23186 (https://gna.org/bugs/index.php?23186): Error calculation of 
individual parameter "dw" from Monte-Carlo, is based on first spin.
........
  r27160 | tlinnet | 2015-01-14 14:45:20 +0100 (Wed, 14 Jan 2015) | 3 lines
  
  Added systemtest "Relax_disp.test_bug_23186_cluster_error_calc_dw", which 
shows the failure of monte carlo simulations error calculations.
  
  Bug #23186 (https://gna.org/bugs/index.php?23186): Error calculation of 
individual parameter "dw" from Monte-Carlo, is based on first spin.
........
  r27161 | tlinnet | 2015-01-14 14:55:37 +0100 (Wed, 14 Jan 2015) | 3 lines
  
  Added additional test for r2a parameter.
  
  Bug #23186 (https://gna.org/bugs/index.php?23186): Error calculation of 
individual parameter "dw" from Monte-Carlo, is based on first spin.
........

Added:
    
branches/frame_order_cleanup/test_suite/shared_data/dispersion/bug_23186.bz2
      - copied unchanged from r27161, 
trunk/test_suite/shared_data/dispersion/bug_23186.bz2
Modified:
    branches/frame_order_cleanup/   (props changed)
    branches/frame_order_cleanup/test_suite/system_tests/relax_disp.py

Propchange: branches/frame_order_cleanup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jan 20 14:01:49 2015
@@ -1 +1 @@
-/trunk:1-27116,27119-27155
+/trunk:1-27116,27119-27161

Modified: branches/frame_order_cleanup/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/test_suite/system_tests/relax_disp.py?rev=27232&r1=27231&r2=27232&view=diff
==============================================================================
--- branches/frame_order_cleanup/test_suite/system_tests/relax_disp.py  
(original)
+++ branches/frame_order_cleanup/test_suite/system_tests/relax_disp.py  Tue 
Jan 20 14:01:49 2015
@@ -1449,6 +1449,61 @@
 
         # Assert that the number of columns is equal, plus 1 for "#".
         self.assertEqual(nr_split_header, len(line_split_val) + 1)
+
+
+    def test_bug_23186_cluster_error_calc_dw(self):
+        """Catch U{bug #23186<https://gna.org/bugs/?23186>}: Error 
calculation of individual parameter "dw" from Monte-Carlo, is based on first 
spin."""
+
+        # Clear the data store.
+        self.interpreter.reset()
+
+        # Load the state.
+        state = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_23186.bz2'
+        self.interpreter.state.load(state, force=True)
+
+        # Dic key to spectrometer frq.
+        dickey = 'SQ CPMG - 599.89086220 MHz'
+
+        # First get the resi 0 array of sim r2a.
+        resi_0_r2a = []
+
+        # Loop over the dics in spin.
+        for cdic in cdp.mol[0].res[0].spin[0].r2a_sim:
+            resi_0_r2a.append(cdic[dickey])
+
+        # Get stats with numpy
+        resi_0_r2a_std = std(asarray(resi_0_r2a), ddof=1)
+
+        # First get the resi 86 array of sim r2a.
+        resi_86_r2a = []
+
+        # Loop over the dics in spin.
+        for cdic in cdp.mol[0].res[1].spin[0].r2a_sim:
+            resi_86_r2a.append(cdic[dickey])
+
+        # Get stats with numpy
+        resi_86_r2a_std = std(asarray(resi_86_r2a), ddof=1)
+
+        # Then get for dw.
+
+        # First get the array of sim dw.
+        resi_0_dw = cdp.mol[0].res[0].spin[0].dw_sim
+        resi_86_dw = cdp.mol[0].res[1].spin[0].dw_sim
+
+        # Get stats with numpy
+        resi_0_dw_std = std(asarray(resi_0_dw), ddof=1)
+        resi_86_dw_std = std(asarray(resi_86_dw), ddof=1)
+
+        # Perform error analysis.
+        self.interpreter.monte_carlo.error_analysis()
+
+        # Check values for r2a.
+        self.assertEqual(resi_0_r2a_std, 
cdp.mol[0].res[0].spin[0].r2a_err[dickey])
+        self.assertEqual(resi_86_r2a_std, 
cdp.mol[0].res[1].spin[0].r2a_err[dickey])
+
+        # Check values for dw.
+        self.assertEqual(resi_0_dw_std, cdp.mol[0].res[0].spin[0].dw_err)
+        self.assertEqual(resi_86_dw_std, cdp.mol[0].res[1].spin[0].dw_err)
 
 
     def test_bug_9999_slow_r1rho_r2eff_error_with_mc(self):




Related Messages


Powered by MHonArc, Updated Tue Jan 20 14:20:03 2015