mailr12526 - /branches/bmrb/generic_fns/bmrb.py


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

Header


Content

Posted by edward on February 15, 2011 - 11:57:
Author: bugman
Date: Tue Feb 15 11:57:37 2011
New Revision: 12526

URL: http://svn.gna.org/viewcvs/relax?rev=12526&view=rev
Log:
Fix for the num_spins() BMRB function - the keys are not always present.


Modified:
    branches/bmrb/generic_fns/bmrb.py

Modified: branches/bmrb/generic_fns/bmrb.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/generic_fns/bmrb.py?rev=12526&r1=12525&r2=12526&view=diff
==============================================================================
--- branches/bmrb/generic_fns/bmrb.py (original)
+++ branches/bmrb/generic_fns/bmrb.py Tue Feb 15 11:57:37 2011
@@ -176,13 +176,13 @@
 
     # The number of spins.
     N = 0
-    if data['data_ids']:
+    if 'data_ids' in data.keys() and data['data_ids']:
         N = len(data['data_ids'])
-    elif data['entity_ids']:
+    elif 'entity_ids' in data.keys() and data['entity_ids']:
         N = len(data['entity_ids'])
-    elif data['res_nums']:
+    elif 'res_nums' in data.keys() and data['res_nums']:
         N = len(data['res_nums'])
-    elif data['s2']:
+    elif 's2' in data.keys() and data['s2']:
         N = len(data['s2'])
 
     # Return the number.




Related Messages


Powered by MHonArc, Updated Tue Feb 15 15:00:02 2011