mailr18730 - /branches/frame_order_testing/specific_fns/frame_order.py


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

Header


Content

Posted by edward on March 09, 2013 - 11:51:
Author: bugman
Date: Sat Mar  9 11:51:20 2013
New Revision: 18730

URL: http://svn.gna.org/viewcvs/relax?rev=18730&view=rev
Log:
The frame order specific analysis return_error() method can now handle 
missing errors.

If the alignment ID key is not found in the RDC or PCS data structures, then 
the value of None is
used instead.


Modified:
    branches/frame_order_testing/specific_fns/frame_order.py

Modified: branches/frame_order_testing/specific_fns/frame_order.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/specific_fns/frame_order.py?rev=18730&r1=18729&r2=18730&view=diff
==============================================================================
--- branches/frame_order_testing/specific_fns/frame_order.py (original)
+++ branches/frame_order_testing/specific_fns/frame_order.py Sat Mar  9 
11:51:20 2013
@@ -2372,8 +2372,13 @@
             if not hasattr(interatom, 'rdc_err'):
                 raise RelaxError("The RDC errors are missing for interatomic 
data container between spins '%s' and '%s'." % (spin_id1, spin_id2))
 
+            # Handle missing data.
+            if align_id not in interatom.rdc_err:
+                mc_errors.append(None)
+
             # Append the data.
-            mc_errors.append(interatom.rdc_err[align_id])
+            else:
+                mc_errors.append(interatom.rdc_err[align_id])
 
         # The PCS data.
         elif data_id[0] == 'pcs':
@@ -2387,8 +2392,13 @@
             if not hasattr(spin, 'pcs_err'):
                 raise RelaxError("The PCS errors are missing for spin '%s'." 
% spin_id)
 
+            # Handle missing data.
+            if align_id not in spin.pcs_err:
+                mc_errors.append(None)
+
             # Append the data.
-            mc_errors.append(spin.pcs_err[align_id])
+            else:
+                mc_errors.append(spin.pcs_err[align_id])
 
         # Return the errors.
         return mc_errors




Related Messages


Powered by MHonArc, Updated Sat Mar 09 13:20:02 2013