mailr21198 - /branches/relax_disp/specific_analyses/relax_disp/disp_data.py


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

Header


Content

Posted by edward on October 21, 2013 - 14:36:
Author: bugman
Date: Mon Oct 21 14:36:51 2013
New Revision: 21198

URL: http://svn.gna.org/viewcvs/relax?rev=21198&view=rev
Log:
The dispersion data return_cpmg_frqs() and return_spin_lock_nu1() functions 
are now safer.

These specific_analyses.relax_disp.disp_data module functions can now be 
called when no data is
present.


Modified:
    branches/relax_disp/specific_analyses/relax_disp/disp_data.py

Modified: branches/relax_disp/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/disp_data.py?rev=21198&r1=21197&r2=21198&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp/disp_data.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp/disp_data.py Mon Oct 21 
14:36:51 2013
@@ -1105,6 +1105,10 @@
     @rtype:             numpy rank-1 float64 array
     """
 
+    # No data.
+    if not hasattr(cdp, 'cpmg_frqs_list'):
+        return None
+
     # Initialise.
     cpmg_frqs = []
 
@@ -1557,6 +1561,10 @@
     @rtype:             numpy rank-1 float64 array
     """
 
+    # No data.
+    if not hasattr(cdp, 'spin_lock_nu1_list'):
+        return None
+
     # Initialise.
     nu1 = []
 




Related Messages


Powered by MHonArc, Updated Mon Oct 21 15:00:02 2013