Menu

Commit [r2756]  Maximize  Restore  History

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()

bugman 2006-11-07

changed /branches/tensor_pdb/data.py
/branches/tensor_pdb/data.py Diff Switch to side-by-side view
Loading...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.