mailr14831 - in /1.3/generic_fns: pcs.py rdc.py


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

Header


Content

Posted by edward on October 12, 2011 - 14:00:
Author: bugman
Date: Wed Oct 12 14:00:19 2011
New Revision: 14831

URL: http://svn.gna.org/viewcvs/relax?rev=14831&view=rev
Log:
The RDC and PCS Q factor functions are now more robust when data is missing.

The data checks are now more extensive.


Modified:
    1.3/generic_fns/pcs.py
    1.3/generic_fns/rdc.py

Modified: 1.3/generic_fns/pcs.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/pcs.py?rev=14831&r1=14830&r2=14831&view=diff
==============================================================================
--- 1.3/generic_fns/pcs.py (original)
+++ 1.3/generic_fns/pcs.py Wed Oct 12 14:00:19 2011
@@ -360,13 +360,13 @@
             spin_count += 1
 
             # Data checks.
-            if hasattr(spin, 'pcs'):
+            if hasattr(spin, 'pcs') and spin.pcs.has_key(align_id):
                 pcs_data = True
-            if hasattr(spin, 'pcs_bc'):
+            if hasattr(spin, 'pcs_bc') and spin.pcs_bc.has_key(align_id):
                 pcs_bc_data = True
 
             # Skip spins without PCS data.
-            if not hasattr(spin, 'pcs') or not hasattr(spin, 'pcs_bc') or 
align_id not in spin.pcs.keys() or spin.pcs[align_id] == None:
+            if not hasattr(spin, 'pcs') or not hasattr(spin, 'pcs_bc') or 
not spin.pcs.has_key(align_id) or spin.pcs[align_id] == None or not 
spin.pcs_bc.has_key(align_id) or spin.pcs_bc[align_id] == None:
                 continue
 
             # Sum of squares.

Modified: 1.3/generic_fns/rdc.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/rdc.py?rev=14831&r1=14830&r2=14831&view=diff
==============================================================================
--- 1.3/generic_fns/rdc.py (original)
+++ 1.3/generic_fns/rdc.py Wed Oct 12 14:00:19 2011
@@ -290,13 +290,13 @@
             spin_count += 1
 
             # Data checks.
-            if hasattr(spin, 'rdc'):
+            if hasattr(spin, 'rdc') and spin.rdc.has_key(align_id):
                 rdc_data = True
-            if hasattr(spin, 'rdc_bc'):
+            if hasattr(spin, 'rdc_bc') and spin.rdc_bc.has_key(align_id):
                 rdc_bc_data = True
 
             # Skip spins without RDC data.
-            if not hasattr(spin, 'rdc') or not hasattr(spin, 'rdc_bc') or 
align_id not in spin.rdc.keys() or spin.rdc[align_id] == None:
+            if not hasattr(spin, 'rdc') or not hasattr(spin, 'rdc_bc') or 
not spin.rdc.has_key(align_id) or spin.rdc[align_id] == None or not 
spin.rdc_bc.has_key(align_id) or spin.rdc_bc[align_id] == None:
                 continue
 
             # Sum of squares.




Related Messages


Powered by MHonArc, Updated Wed Oct 12 14:20:02 2011