mailr3939 - in /1.3: data/diff_tensor.py test_suite/unit_tests/_data/test_diff_tensor.py


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

Header


Content

Posted by edward on November 25, 2007 - 19:22:
Author: bugman
Date: Sun Nov 25 19:22:06 2007
New Revision: 3939

URL: http://svn.gna.org/viewcvs/relax?rev=3939&view=rev
Log:
Updated the diffusion tensor data structure in the relax data store for the 
new relax design.

The object is no longer a dictionary type with keys set to the run names.  It 
is simply a container.


Modified:
    1.3/data/diff_tensor.py
    1.3/test_suite/unit_tests/_data/test_diff_tensor.py

Modified: 1.3/data/diff_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/data/diff_tensor.py?rev=3939&r1=3938&r2=3939&view=diff
==============================================================================
--- 1.3/data/diff_tensor.py (original)
+++ 1.3/data/diff_tensor.py Sun Nov 25 19:22:06 2007
@@ -550,25 +550,7 @@
 # Diffusion tensor specific data.
 #################################
 
-class DiffTensorData(SpecificData):
-    def __init__(self):
-        """Dictionary type class for the diffusion tensor data.
-
-        The non-default diffusion parameters are calculated on the fly.
-        """
-
-
-    def add_item(self, key):
-        """Function for adding an empty container to the dictionary.
-
-        This overwrites the function from the parent class SpecificData.
-        """
-
-        self[key] = DiffTensorElement()
-
-
-
-class DiffTensorElement(Element):
+class DiffTensorData(Element):
     def __init__(self):
         """An empty data container for the diffusion tensor elements."""
 
@@ -863,7 +845,7 @@
         ListType.__setitem__(self, index, value)
 
         # Then update the other lists.
-        
self.diff_element._DiffTensorElement__update_sim_set(self.param_name, index)
+        self.diff_element._DiffTensorData__update_sim_set(self.param_name, 
index)
 
 
     def append(self, value):
@@ -873,7 +855,7 @@
         self[len(self):len(self)] = [value]
 
         # Update the other MC lists.
-        
self.diff_element._DiffTensorElement__update_sim_append(self.param_name, 
len(self)-1)
+        
self.diff_element._DiffTensorData__update_sim_append(self.param_name, 
len(self)-1)
 
 
     def append_untouchable_item(self, value):

Modified: 1.3/test_suite/unit_tests/_data/test_diff_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_data/test_diff_tensor.py?rev=3939&r1=3938&r2=3939&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_data/test_diff_tensor.py (original)
+++ 1.3/test_suite/unit_tests/_data/test_diff_tensor.py Sun Nov 25 19:22:06 
2007
@@ -26,7 +26,7 @@
 from unittest import TestCase
 
 # relax module imports.
-from data.diff_tensor import DiffTensorElement, DiffTensorSimList
+from data.diff_tensor import DiffTensorData, DiffTensorSimList
 from relax_errors import RelaxError
 
 
@@ -59,9 +59,9 @@
 
 
     def setUp(self):
-        """Set 'self.diff_data' to an empty instance of the 
DiffTensorElement class."""
-
-        self.diff_data = DiffTensorElement()
+        """Set 'self.diff_data' to an empty instance of the DiffTensorData 
class."""
+
+        self.diff_data = DiffTensorData()
 
 
     def test_append_spheroid_sim(self):




Related Messages


Powered by MHonArc, Updated Sun Nov 25 19:40:08 2007