mailr24792 - /branches/r1rho_plotting/specific_analyses/relax_disp/data.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by tlinnet on July 29, 2014 - 10:24:
Author: tlinnet
Date: Tue Jul 29 10:24:57 2014
New Revision: 24792

URL: http://svn.gna.org/viewcvs/relax?rev=24792&view=rev
Log:
Ensured production of plotting r1rho r2 as function of effective field w_eff, 
when spin.isotope is not present.

The offset in radians would be set to 0.0 instead.

This can happen when it is 'exp_fit' model curve fitting.

sr #3124(https://gna.org/support/?3124): Grace graphs production for R1rho 
analysis with R2_eff as function of Omega_eff.
sr #3138(https://gna.org/support/?3138): Interpolating theta through 
spin-lock offset [Omega], rather than spin-lock field strength [w1].

Modified:
    branches/r1rho_plotting/specific_analyses/relax_disp/data.py

Modified: branches/r1rho_plotting/specific_analyses/relax_disp/data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/r1rho_plotting/specific_analyses/relax_disp/data.py?rev=24792&r1=24791&r2=24792&view=diff
==============================================================================
--- branches/r1rho_plotting/specific_analyses/relax_disp/data.py        
(original)
+++ branches/r1rho_plotting/specific_analyses/relax_disp/data.py        Tue 
Jul 29 10:24:57 2014
@@ -2859,7 +2859,10 @@
                 continue
 
             # Convert offset to rad/s from ppm.
-            offset_rad = frequency_to_rad_per_s(frq=offset, B0=frq, 
isotope=current_spin.isotope)
+            if hasattr(current_spin, 'isotope'):
+                offset_rad = frequency_to_rad_per_s(frq=offset, B0=frq, 
isotope=current_spin.isotope)
+            else:
+                offset_rad = 0.0
 
             # Convert spin-lock field strength from Hz to rad/s.
             omega1 = point * 2.0 * pi
@@ -3238,7 +3241,10 @@
                     continue
 
                 # Convert offset to rad/s from ppm.
-                offset_rad = frequency_to_rad_per_s(frq=offset, B0=frq, 
isotope=current_spin.isotope)
+                if hasattr(current_spin, 'isotope'):
+                    offset_rad = frequency_to_rad_per_s(frq=offset, B0=frq, 
isotope=current_spin.isotope)
+                else:
+                    offset_rad = 0.0
 
                 # Convert spin-lock field strength from Hz to rad/s.
                 omega1 = point * 2.0 * pi
@@ -4029,7 +4035,10 @@
                 raise RelaxError("The spin-lock offsets have not been set.")
 
             # Convert the shift from ppm to rad/s and store it.
-            shifts[ei][si][mi] = frequency_to_rad_per_s(frq=shift, B0=frq, 
isotope=spin.isotope)
+            if hasattr(spin, 'isotope'):
+                shifts[ei][si][mi] = frequency_to_rad_per_s(frq=shift, 
B0=frq, isotope=spin.isotope)
+            else:
+                shifts[ei][si][mi] = shift
 
             # Enable possible interpolation of spin-lock offset.
             if spin_lock_offset != None:
@@ -4061,7 +4070,7 @@
 
                     # Store the offset in rad/s from ppm.  Only once and 
using the first key.
                     if offsets[ei][si][mi][oi] == None:
-                        if r1rho_flag and hasattr(cdp, 'spin_lock_offset'):
+                        if r1rho_flag and hasattr(cdp, 'spin_lock_offset') 
and hasattr(spin, 'isotope'):
                             offsets[ei][si][mi][oi] = 
frequency_to_rad_per_s(frq=offset, B0=frq, isotope=spin.isotope)
                         else:
                             offsets[ei][si][mi][oi] = 0.0
@@ -4127,7 +4136,7 @@
 
                     # Store the offset in rad/s.  Only once and using the 
first key.
                     if offsets[ei][si][mi][oi] == None:
-                        if r1rho_flag and hasattr(cdp, 'spin_lock_offset'):
+                        if r1rho_flag and hasattr(cdp, 'spin_lock_offset') 
and hasattr(spin, 'isotope'):
                             offsets[ei][si][mi][oi] = 
frequency_to_rad_per_s(frq=cdp.spin_lock_offset[id], B0=frq, 
isotope=spin.isotope)
                         else:
                             offsets[ei][si][mi][oi] = 0.0




Related Messages


Powered by MHonArc, Updated Tue Jul 29 10:40:02 2014