mailr8931 - in /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 March 08, 2009 - 22:44:
Author: bugman
Date: Sun Mar  8 22:44:06 2009
New Revision: 8931

URL: http://svn.gna.org/viewcvs/relax?rev=8931&view=rev
Log:
Merged revisions 8928-8930 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3

........
  r8929 | bugman | 2009-03-08 22:36:03 +0100 (Sun, 08 Mar 2009) | 3 lines
  
  None args are now allowed in pack_data(), and the arg lengths are checked.
........

Modified:
    branches/bmrb/   (props changed)
    branches/bmrb/generic_fns/relax_data.py

Propchange: branches/bmrb/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Mar  8 22:44:06 2009
@@ -1,1 +1,1 @@
-/1.3:1-8927
+/1.3:1-8930

Modified: branches/bmrb/generic_fns/relax_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/generic_fns/relax_data.py?rev=8931&r1=8930&r2=8931&view=diff
==============================================================================
--- branches/bmrb/generic_fns/relax_data.py (original)
+++ branches/bmrb/generic_fns/relax_data.py Sun Mar  8 22:44:06 2009
@@ -627,6 +627,35 @@
                             data to be generated.
     @type gen_seq:          bool
     """
+
+    # The number of spins.
+    N = len(values)
+
+    # Convert None args.
+    if not mol_names:
+        mol_names = [None]*N
+    if not res_nums:
+        res_nums = [None]*N
+    if not res_names:
+        res_names = [None]*N
+    if not spin_nums:
+        spin_nums = [None]*N
+    if not spin_names:
+        spin_names = [None]*N
+
+    # Test the data.
+    if 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 len(mol_names) != N:
+        raise RelaxError, "The length of the mol_names arg (%s) does not 
match that of the value arg (%s)." % (len(mol_names), N)
+    if len(res_nums) != N:
+        raise RelaxError, "The length of the res_nums arg (%s) does not 
match that of the value arg (%s)." % (len(res_nums), N)
+    if len(res_names) != N:
+        raise RelaxError, "The length of the res_names arg (%s) does not 
match that of the value arg (%s)." % (len(res_names), N)
+    if len(spin_nums) != N:
+        raise RelaxError, "The length of the spin_nums arg (%s) does not 
match that of the value arg (%s)." % (len(spin_nums), N)
+    if len(spin_names) != N:
+        raise RelaxError, "The length of the spin_names arg (%s) does not 
match that of the value arg (%s)." % (len(spin_names), N)
 
     # Get the current data pipe.
     cdp = pipes.get_pipe()




Related Messages


Powered by MHonArc, Updated Sun Mar 08 23:40:05 2009