mailr12523 - /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 February 15, 2011 - 09:00:
Author: bugman
Date: Tue Feb 15 09:00:39 2011
New Revision: 12523

URL: http://svn.gna.org/viewcvs/relax?rev=12523&view=rev
Log:
Fixes for pack_data() to allow the errors to be a numpy array.


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=12523&r1=12522&r2=12523&view=diff
==============================================================================
--- branches/bmrb/generic_fns/relax_data.py (original)
+++ branches/bmrb/generic_fns/relax_data.py Tue Feb 15 09:00:39 2011
@@ -772,9 +772,9 @@
     @param frq:             The spectrometer proton frequency in Hz.
     @type frq:              float
     @keyword values:        The relaxation data for each spin.
-    @type values:           None or list of str
+    @type values:           None or list of float or float array
     @keyword errors:        The relaxation data errors for each spin.
-    @type errors:           None or list of str
+    @type errors:           None or list of float or float array
     @keyword spin_ids:      The list of spin ID strings.  If the other spin 
identifiers are given, i.e. mol_names, res_nums, res_names, spin_nums, and/or 
spin_names, then this argument is not necessary.
     @type spin_ids:         None or list of str
     @keyword mol_names:     The list of molecule names used for creating the 
spin IDs (if not given) or for generating the sequence data.
@@ -795,7 +795,7 @@
     N = len(values)
 
     # Test the data.
-    if errors and len(errors) != N:
+    if errors != None 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))
@@ -821,7 +821,7 @@
         spin_nums = [None] * N
     if not spin_names:
         spin_names = [None] * N
-    if not errors:
+    if errors == None:
         errors = [None] * N
 
     # Generate the spin IDs.




Related Messages


Powered by MHonArc, Updated Tue Feb 15 09:20:02 2011