Author: bugman Date: Tue Nov 24 11:52:38 2009 New Revision: 9904 URL: http://svn.gna.org/viewcvs/relax?rev=9904&view=rev Log: Removed back_calc() from the specific analysis API. Modified: 1.3/specific_fns/model_free/main.py 1.3/specific_fns/model_free/mf_minimise.py 1.3/specific_fns/relax_fit.py Modified: 1.3/specific_fns/model_free/main.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/main.py?rev=9904&r1=9903&r2=9904&view=diff ============================================================================== --- 1.3/specific_fns/model_free/main.py (original) +++ 1.3/specific_fns/model_free/main.py Tue Nov 24 11:52:38 2009 @@ -468,6 +468,28 @@ return scaling_matrix + def _back_calc(self, index=None, ri_label=None, frq_label=None, frq=None): + """Back-calculation of relaxation data from the model-free parameter values. + + @keyword index: The relaxation data index. + @type index: int + @keyword ri_label: The relaxation data type, i.e. 'R1', 'R2', or 'NOE'. + @type ri_label: str + @keyword frq_label: The field strength label. + @type frq_label: str + @keyword frq: The field strength. + @type frq: float + @return: The back calculated relaxation data value corresponding to the index. + @rtype: float + """ + + # Get the relaxation value from the minimise function. + value = self.minimise(min_algor='back_calc', min_options=(index, ri_label, frq_label, frq)) + + # Return the relaxation value. + return value + + def create_mc_data(self, spin_id): """Create the Monte Carlo Ri data. @@ -496,7 +518,7 @@ # Loop over the relaxation data. for j in xrange(len(spin.relax_data)): # Back calculate the value. - value = self.back_calc(index=global_index, ri_label=spin.ri_labels[j], frq_label=spin.frq_labels[spin.remap_table[j]], frq=spin.frq[spin.remap_table[j]]) + value = self._back_calc(index=global_index, ri_label=spin.ri_labels[j], frq_label=spin.frq_labels[spin.remap_table[j]], frq=spin.frq[spin.remap_table[j]]) # Append the value. mc_data.append(value) Modified: 1.3/specific_fns/model_free/mf_minimise.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/mf_minimise.py?rev=9904&r1=9903&r2=9904&view=diff ============================================================================== --- 1.3/specific_fns/model_free/mf_minimise.py (original) +++ 1.3/specific_fns/model_free/mf_minimise.py Tue Nov 24 11:52:38 2009 @@ -44,29 +44,6 @@ class Mf_minimise: """Class containing functions specific to model-free optimisation.""" - - - def back_calc(self, index=None, ri_label=None, frq_label=None, frq=None): - """Back-calculation of relaxation data from the model-free parameter values. - - @keyword index: The relaxation data index. - @type index: int - @keyword ri_label: The relaxation data type, i.e. 'R1', 'R2', or 'NOE'. - @type ri_label: str - @keyword frq_label: The field strength label. - @type frq_label: str - @keyword frq: The field strength. - @type frq: float - @return: The back calculated relaxation data value corresponding to the index. - @rtype: float - """ - - # Get the relaxation value from the minimise function. - value = self.minimise(min_algor='back_calc', min_options=(index, ri_label, frq_label, frq)) - - # Return the relaxation value. - return value - def calculate(self, spin_id=None, verbosity=1, sim_index=None): """Calculation of the model-free chi-squared value. Modified: 1.3/specific_fns/relax_fit.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/relax_fit.py?rev=9904&r1=9903&r2=9904&view=diff ============================================================================== --- 1.3/specific_fns/relax_fit.py (original) +++ 1.3/specific_fns/relax_fit.py Tue Nov 24 11:52:38 2009 @@ -132,7 +132,7 @@ return scaling_matrix - def back_calc(self, spin=None, relax_time_index=None): + def _back_calc(self, spin=None, relax_time_index=None): """Back-calculation of peak intensity for the given relaxation time. @keyword spin: The spin container. @@ -193,7 +193,7 @@ # Loop over the spectral time points. for j in xrange(len(cdp.relax_times)): # Back calculate the value. - value = self.back_calc(spin=spin, relax_time_index=j) + value = self._back_calc(spin=spin, relax_time_index=j) # Append the value. mc_data.append(value)