Author: bugman Date: Wed Feb 20 09:36:10 2008 New Revision: 5037 URL: http://svn.gna.org/viewcvs/relax?rev=5037&view=rev Log: Updated the generic_fns.structure.autoscale_tensor() function. The docstring was changed to epydoc format, the default method changed from None to 'mass', and a few comments were added. Modified: 1.3/generic_fns/structure.py Modified: 1.3/generic_fns/structure.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure.py?rev=5037&r1=5036&r2=5037&view=diff ============================================================================== --- 1.3/generic_fns/structure.py (original) +++ 1.3/generic_fns/structure.py Wed Feb 20 09:36:10 2008 @@ -189,15 +189,22 @@ raise RelaxError, "The mass of the element " + `element` + " has not yet been programmed into relax." -def autoscale_tensor(method=None): - """Automatically determine an appropriate scaling factor for display - of the diffusion tensor""" - +def autoscale_tensor(method='mass'): + """Automatically determine an appropriate scaling factor for display of the diffusion tensor. + + @param method: The method used to determine the scaling of the diffusion tensor object. + @type method: str + @return: The scaling factor. + @rtype: float + """ + + # Centre of mass method. if method == 'mass': com, mass = centre_of_mass(return_mass=True) scale = mass * 6.8e-11 return scale + # Autoscaling method. warn(RelaxWarning("Autoscale method %s not implimented. Reverting to scale=1.8e-6 A.s" % method)) return 1.8e-6