mailr12469 - /branches/bmrb/generic_fns/relax_data.py


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

Header


Content

Posted by edward on January 31, 2011 - 16:31:
Author: bugman
Date: Mon Jan 31 16:31:56 2011
New Revision: 12469

URL: http://svn.gna.org/viewcvs/relax?rev=12469&view=rev
Log:
The relaxation data pack_data() function can now handle missing errors.


Modified:
    branches/bmrb/generic_fns/relax_data.py

Modified: branches/bmrb/generic_fns/relax_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/generic_fns/relax_data.py?rev=12469&r1=12468&r2=12469&view=diff
==============================================================================
--- branches/bmrb/generic_fns/relax_data.py (original)
+++ branches/bmrb/generic_fns/relax_data.py Mon Jan 31 16:31:56 2011
@@ -762,7 +762,7 @@
     N = len(values)
 
     # Test the data.
-    if len(errors) != N:
+    if errors and len(errors) != N:
         raise RelaxError("The length of the errors arg (%s) does not match 
that of the value arg (%s)." % (len(errors), N))
     if spin_ids and len(spin_ids) != N:
         raise RelaxError("The length of the spin ID strings arg (%s) does 
not match that of the value arg (%s)." % (len(mol_names), N))
@@ -788,6 +788,8 @@
         spin_nums = [None] * N
     if not spin_names:
         spin_names = [None] * N
+    if not errors:
+        errors = [None] * N
 
     # Generate the spin IDs.
     if not spin_ids:




Related Messages


Powered by MHonArc, Updated Mon Jan 31 16:40:02 2011