Author: bugman Date: Tue Nov 7 06:31:30 2006 New Revision: 2756 URL: http://svn.gna.org/viewcvs/relax?rev=2756&view=rev Log: Redesign of the diffusion tensor data structure 'self.relax.data.diff'. All of the Numeric data structures returned by the 'self.__getattr__()' function have been shifted into their own instances of a new objected defined by the DiffAutoNumericObject class. This new class when instantiated expects as an argument a function which will return a Numeric array, matrix, etc. Using this function, the object currently implements the functions: __add__(), implementation of addition. __getitem__(), selecting individual elements of the array. __iter__(), for looping over the array. __len__(), the length of the array. __mul__(), implementation of multiplication. __repr__(), the 'official' string representation. __setitm__(), throw a RelaxError if modification of the structure is attempted. To enable the automatically generated objects, the code from 'self.__getattr__()' has been shifted into the following 'hidden' functions of the DiffTensorElement class: _auto_object_Dpar_unit() _auto_object_Dx_unit() _auto_object_Dy_unit() _auto_object_Dz_unit() _auto_object_rotation() _auto_object_tensor() _auto_object_tensor_diag() Modified: branches/tensor_pdb/data.py [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/tensor_pdb/data.py URL: http://svn.gna.org/viewcvs/relax/branches/tensor_pdb/data.py?rev=2756&r1=2755&r2=2756&view=diff