Author: bugman Date: Wed Apr 16 17:18:37 2008 New Revision: 5784 URL: http://svn.gna.org/viewcvs/relax?rev=5784&view=rev Log: Converted the model-free return_conversion_factor() method to the new design. Modified: 1.3/specific_fns/model_free/model_free.py Modified: 1.3/specific_fns/model_free/model_free.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/model_free.py?rev=5784&r1=5783&r2=5784&view=diff ============================================================================== --- 1.3/specific_fns/model_free/model_free.py (original) +++ 1.3/specific_fns/model_free/model_free.py Wed Apr 16 17:18:37 2008 @@ -2608,12 +2608,23 @@ relax_data_store.warning[self.run] = None - def return_conversion_factor(self, param): - """Function for returning the factor of conversion between different parameter units. + def return_conversion_factor(self, param, spin_id): + """Return the factor of conversion between different parameter units. For example, the internal representation of te is in seconds, whereas the external representation is in picoseconds, therefore this function will return 1e-12 for te. + + + @param param: The name of the parameter to return the lower and upper bounds of. + @type param: str + @param spin_id: The spin identification string. + @type spin_id: str + @return: The conversion factor. + @rtype: float """ + + # Get the spin. + spin = return_spin(spin_id) # Get the object name. object_name = self.return_data_name(param) @@ -2628,7 +2639,7 @@ # Rex (value at 1st field strength). elif object_name == 'rex': - return 1.0 / (2.0 * pi * relax_data_store.frq[self.run][0])**2 + return 1.0 / (2.0 * pi * spin.frq[0])**2 # Bond length (Angstrom). elif object_name == 'r':