mailr4039 - /branches/N_state_model/data/align_tensor.py


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

Header


Content

Posted by edward on November 26, 2007 - 16:47:
Author: bugman
Date: Mon Nov 26 16:40:27 2007
New Revision: 4039

URL: http://svn.gna.org/viewcvs/relax?rev=4039&view=rev
Log:
Updated the AlignTensorData.__setattr__() method for alignment tensor data.


Modified:
    branches/N_state_model/data/align_tensor.py

Modified: branches/N_state_model/data/align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/data/align_tensor.py?rev=4039&r1=4038&r2=4039&view=diff
==============================================================================
--- branches/N_state_model/data/align_tensor.py (original)
+++ branches/N_state_model/data/align_tensor.py Mon Nov 26 16:40:27 2007
@@ -282,6 +282,10 @@
     def __setattr__(self, name, value):
         """Function for calculating the parameters, unit vectors, and 
tensors on the fly.
 
+        @param name:    The name of the object to set.
+        @type name:     str
+        @param value:   The value to set the object corresponding to the 
name argument to.
+        @type value:    Any Python object type
         """
 
         # Get the base parameter name and determine the object category 
('val', 'err', or 'sim').
@@ -296,14 +300,11 @@
             param_name = name
 
         # List of modifiable attributes.
-        mod_attr = ['type',
-                    'fixed',
-                    'spheroid_type',
-                    'tm',
-                    'Da',
-                    'Dr',
-                    'theta',
-                    'phi',
+        mod_attr = ['Axx',
+                    'Ayy',
+                    'Axy',
+                    'Axz',
+                    'Ayz',
                     'alpha',
                     'beta',
                     'gamma']
@@ -315,12 +316,8 @@
         # Set the attribute normally.
         self.__dict__[name] = value
 
-        # Skip the updating process for certain objects.
-        if name in ['type', 'fixed', 'spheroid_type']:
-            return
-
         # Update the data structures.
-        for target, update_if_set, depends in 
dependency_generator(self.type):
+        for target, update_if_set, depends in dependency_generator():
             self.__update_object(param_name, target, update_if_set, depends, 
category)
 
 




Related Messages


Powered by MHonArc, Updated Mon Nov 26 17:00:29 2007