For a much better solution to this problem, see
http://thread.gmane.org/gmane.science.nmr.relax.devel/5119/focus=5214.
Regards,
Edward
On 14 March 2014 23:21,  <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet
Date: Fri Mar 14 23:21:22 2014
New Revision: 22480
URL: http://svn.gna.org/viewcvs/relax?rev=22480&view=rev
Log:
Fix for calculating the theta angle describing the tilted rotating frame 
relative to the laboratory, when omega1 / Delta_omega is negative.
Regarding sr #3124, (https://gna.org/support/index.php?3124) - Grace 
graphs production for R1rho analysis with R2_eff as function of Omega_eff.
This follows discussion in: 
http://thread.gmane.org/gmane.science.nmr.relax.devel/5205.
Modified:
    trunk/specific_analyses/relax_disp/disp_data.py
Modified: trunk/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=22480&r1=22479&r2=22480&view=diff
==============================================================================
--- trunk/specific_analyses/relax_disp/disp_data.py     (original)
+++ trunk/specific_analyses/relax_disp/disp_data.py     Fri Mar 14 
23:21:22 2014
@@ -2890,8 +2890,13 @@
                 Domega[ei][si][mi][oi].append(Delta_omega)
                 if Delta_omega == 0.0:
                     theta[ei][si][mi][oi].append(pi / 2.0)
+                # Calculate the theta angle describing the tilted 
rotating frame relative to the laboratory.
+                # If Delta_omega is negative, there follow the symmetry 
of atan, that atan(-x) = - atan(x).
+                # Then it should be: theta = pi + atan(-x) = pi - 
atan(x) = pi - abs(atan( +/- x))
+                elif omega1 / Delta_omega > 0 :
+                    theta[ei][si][mi][oi].append(atan(omega1 / 
Delta_omega))
                 else:
-                    theta[ei][si][mi][oi].append(atan(omega1 / 
Delta_omega))
+                    theta[ei][si][mi][oi].append(pi + atan(omega1 / 
Delta_omega))
                 # Calculate effective field in rotating frame
                 w_eff = sqrt( Delta_omega*Delta_omega + omega1*omega1 )
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
relax-commits@xxxxxxx
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-devel mailing list
relax-devel@xxxxxxx
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel