mailr7476 - /branches/pipe_refs/specific_fns/model_free/main.py


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

Header


Content

Posted by edward on October 01, 2008 - 13:49:
Author: bugman
Date: Wed Oct  1 13:49:13 2008
New Revision: 7476

URL: http://svn.gna.org/viewcvs/relax?rev=7476&view=rev
Log:
Updated the delete() method to the new design.


Modified:
    branches/pipe_refs/specific_fns/model_free/main.py

Modified: branches/pipe_refs/specific_fns/model_free/main.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/pipe_refs/specific_fns/model_free/main.py?rev=7476&r1=7475&r2=7476&view=diff
==============================================================================
--- branches/pipe_refs/specific_fns/model_free/main.py (original)
+++ branches/pipe_refs/specific_fns/model_free/main.py Wed Oct  1 13:49:13 
2008
@@ -844,11 +844,8 @@
             return '1H'
 
 
-    def delete(self, run):
-        """Function for deleting all model-free data."""
-
-        # Arguments.
-        self.run = run
+    def delete(self):
+        """Delete all the model-free data."""
 
         # Test if the current pipe exists.
         pipes.test()
@@ -865,22 +862,16 @@
         # Get all data structure names.
         names = self.data_names()
 
-        # Loop over the sequence.
-        for i in xrange(len(ds.res[self.run])):
-            # Remap the data structure 'ds.res[self.run][i]'.
-            data = ds.res[self.run][i]
-
+        # Loop over the spins.
+        for spin in spin_loop()
             # Loop through the data structure names.
             for name in names:
                 # Skip the data structure if it does not exist.
-                if not hasattr(data, name):
+                if not hasattr(spin, name):
                     continue
 
                 # Delete the data.
-                delattr(data, name)
-
-        # Clean up the runs.
-        self.relax.generic.runs.eliminate_unused_runs()
+                delattr(spin, name)
 
 
     def determine_model_type(self):




Related Messages


Powered by MHonArc, Updated Wed Oct 01 14:00:03 2008