mailr24884 - /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 31, 2014 - 17:22:
Author: tlinnet
Date: Thu Jul 31 17:22:26 2014
New Revision: 24884

URL: http://svn.gna.org/viewcvs/relax?rev=24884&view=rev
Log:
Extended graph labelling, file naming and return of data for multiple CPMG 
graphs types.

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=24884&r1=24883&r2=24884&view=diff
==============================================================================
--- branches/r1rho_plotting/specific_analyses/relax_disp/data.py        
(original)
+++ branches/r1rho_plotting/specific_analyses/relax_disp/data.py        Thu 
Jul 31 17:22:26 2014
@@ -904,7 +904,10 @@
         field_count = cdp.spectrometer_frq_count
 
     # The offset data.
-    offsets, spin_lock_fields_inter, chemical_shifts, tilt_angles, 
Delta_omega, w_eff = return_offset_data(spins=[spin], spin_ids=[spin_id], 
field_count=field_count, fields=spin_lock_nu1_new)
+    if spin.model in MODEL_LIST_R1RHO_FULL and has_r1rho_exp_type():
+        offsets, spin_lock_fields_inter, chemical_shifts, tilt_angles, 
Delta_omega, w_eff = return_offset_data(spins=[spin], spin_ids=[spin_id], 
field_count=field_count, fields=spin_lock_nu1_new)
+    else:
+        offsets, spin_lock_fields_inter, chemical_shifts, tilt_angles, 
Delta_omega, w_eff = return_offset_data(spins=[spin], spin_ids=[spin_id], 
field_count=field_count, fields=cpmg_frqs_new)
 
     if spin.model == MODEL_R2EFF:
         back_calc = None
@@ -2865,13 +2868,11 @@
                 # The X point.
                 if exp_type in EXP_TYPE_LIST_CPMG:
                     point = cpmg_frqs_new[ei][mi][oi][di]
-                    theta = None
-                    w_eff = None
-
                 else:
                     point = spin_lock_nu1_new[ei][mi][oi][di]
-                    theta = tilt_angles_inter[ei][si][mi][oi][di]
-                    w_eff = w_eff_inter[ei][si][mi][oi][di]
+
+                theta = tilt_angles_inter[ei][si][mi][oi][di]
+                w_eff = w_eff_inter[ei][si][mi][oi][di]
 
                 # Return the x and y point.
                 x_point, y_point, err, y_err_point = 
return_grace_x_y_point(data_type=data_type, x_axis=x_axis, y_axis=y_axis, 
interpolate=interpolate, data_key=key, spin=current_spin, back_calc=r2eff, 
point=point, r1=r1[si][mi], r1_err=r1_err[si][mi], w_eff=w_eff, theta=theta, 
err=err)
@@ -3266,8 +3267,11 @@
         file_name_ini = "disp"
 
     # Special file name for R2_R1RHO data.
-    elif has_r1rho_exp_type and y_axis == Y_AXIS_R2_EFF and x_axis != 
X_AXIS_DISP:
+    elif has_r1rho_exp_type() and y_axis == Y_AXIS_R2_EFF and x_axis != 
X_AXIS_DISP:
         file_name_ini = "%s_vs_%s_inter_%s"%("r1rho", x_axis, interpolate)
+
+    elif has_cpmg_exp_type() and y_axis == Y_AXIS_R2_R1RHO:
+        file_name_ini = "%s_vs_%s_inter_%s"%("r2", x_axis, interpolate)
 
     else:
         file_name_ini = "%s_vs_%s_inter_%s"%(y_axis, x_axis, interpolate)
@@ -3326,7 +3330,11 @@
     # If plotting special R1rho R2 values.
     # R_2 = R1rho / sin^2(theta) - R_1 / tan^2(theta) = (R1rho - R_1 * 
cos^2(theta) ) / sin^2(theta).
     elif y_axis == Y_AXIS_R2_R1RHO:
-        if exp_type in EXP_TYPE_LIST_R1RHO:
+        if exp_type in EXP_TYPE_LIST_CPMG:
+            # Set y_label.
+            y_label = "%s - \\qR\\s2\\N\\Q (rad.s\\S-1\\N)"%exp_type
+
+        elif exp_type in EXP_TYPE_LIST_R1RHO:
             # Set y_label.
             y_label = "%s - \\qR\\s2\\N\\Q (rad.s\\S-1\\N)"%exp_type
 
@@ -3370,7 +3378,11 @@
     # If plotting special R1rho R2 values.
     # R_2 = R1rho / sin^2(theta) - R_1 / tan^2(theta) = (R1rho - R_1 * 
cos^2(theta) ) / sin^2(theta).
     elif y_axis == Y_AXIS_R2_R1RHO:
-        if exp_type in EXP_TYPE_LIST_R1RHO:
+        if exp_type in EXP_TYPE_LIST_CPMG:
+            # Set y_label.
+            r_string = "R\\s2\\N"
+
+        elif exp_type in EXP_TYPE_LIST_R1RHO:
             # Set y_label.
             r_string = "R\\s2\\N"
 




Related Messages


Powered by MHonArc, Updated Fri Aug 01 00:00:03 2014