mailr17417 - /trunk/generic_fns/grace.py


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

Header


Content

Posted by edward on September 01, 2012 - 13:13:
Author: bugman
Date: Sat Sep  1 13:13:01 2012
New Revision: 17417

URL: http://svn.gna.org/viewcvs/relax?rev=17417&view=rev
Log:
Bug fix for the generic_fns.grace.get_data() function.

This was just recently introduced and was triggered by the 
Relax_fit.test_bug_12670_12679 system
test.


Modified:
    trunk/generic_fns/grace.py

Modified: trunk/generic_fns/grace.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/grace.py?rev=17417&r1=17416&r2=17417&view=diff
==============================================================================
--- trunk/generic_fns/grace.py (original)
+++ trunk/generic_fns/grace.py Sat Sep  1 13:13:01 2012
@@ -211,22 +211,23 @@
                 y_err = [y_err]
 
             # A new spin type (one data set per spin type).
-            if not data_list and not data_dict and spin.name not in 
spin_names:
-                # Append a new set structure.
-                data[0].append([])
-
-                # Append the label.
-                set_labels.append("%s spins. " % spin.name + set_label)
-
-                # Add the spin name to the list.
-                spin_names.append(spin.name)
-
-                # The set index.
-                index = i * len(spin_names) + spin_names.index(spin.name)
-
-            # Existing spin type, so change the index to match the correct 
data category (fix for bug #20120, https://gna.org/bugs/?20120).
-            else:
-                index = spin_names.index(spin.name)
+            if not data_list and not data_dict:
+                if spin.name not in spin_names:
+                    # Append a new set structure.
+                    data[0].append([])
+
+                    # Append the label.
+                    set_labels.append("%s spins. " % spin.name + set_label)
+
+                    # Add the spin name to the list.
+                    spin_names.append(spin.name)
+
+                    # The set index.
+                    index = i * len(spin_names) + spin_names.index(spin.name)
+
+                # Existing spin type, so change the index to match the 
correct data category (fix for bug #20120, https://gna.org/bugs/?20120).
+                else:
+                    index = spin_names.index(spin.name)
 
             # Loop over the points.
             for j in range(len(x_val)):




Related Messages


Powered by MHonArc, Updated Sat Sep 01 15:00:02 2012