Author: semor Date: Mon Jan 12 15:08:51 2009 New Revision: 8418 URL: http://svn.gna.org/viewcvs/relax?rev=8418&view=rev Log: Started to implement a function for calculating the effective transversal relaxation rate (R2eff). This follows a thread at: https://mail.gna.org/public/relax-devel/2009-01/msg00067.html (Message-id: <496B479D.3070304@xxxxxxxxx>) Modified: branches/relax_disp/specific_fns/relax_fit.py Modified: branches/relax_disp/specific_fns/relax_fit.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_fns/relax_fit.py?rev=8418&r1=8417&r2=8418&view=diff ============================================================================== --- branches/relax_disp/specific_fns/relax_fit.py (original) +++ branches/relax_disp/specific_fns/relax_fit.py Mon Jan 12 15:08:51 2009 @@ -165,6 +165,22 @@ # Return the correct peak height. return results[relax_time_index] + + + def calc_r2eff(self, exp_type='cpmg', id=None, delayT=None, int_cpmg=0, int_ref=0): + """Calculate the effective transversal relaxation rate from the peak intensities. The + equation depends on the experiment type chosen, either 'cpmg' or 'r1rho'. + + If 'cpmg' is chosen, the equation used is: + r2eff = - ( 1 / delayT ) * log ( int_cpmg / int_ref ) + + If 'r1rho' is chosen, nothing happens yet, as the code is not implemented. + """ + + if exp_type == 'cpmg': + r2eff = - ( 1 / delayT ) * log ( int_cpmg / int_ref ) + + return r2eff def create_mc_data(self, spin_id):