Author: tlinnet
Date: Sat Jul 26 13:34:03 2014
New Revision: 24771
URL: http://svn.gna.org/viewcvs/relax?rev=24771&view=rev
Log:
Added functionality to plot R1rho R2 as function of effective field w_eff,
for the R2eff model.
Also renamed a function, to better reflect is functionality.
The hard-coding of which models to plot, has been removed.
If the exp-type is R1rho, then the plotting will commence.
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=24771&r1=24770&r2=24771&view=diff
==============================================================================
--- branches/r1rho_plotting/specific_analyses/relax_disp/data.py
(original)
+++ branches/r1rho_plotting/specific_analyses/relax_disp/data.py
Sat Jul 26 13:34:03 2014
@@ -1564,8 +1564,9 @@
# Plot dispersion curves, extending over number of dispersion points.
plot_disp_curves_disp(dir=dir, num_points=num_points, extend=extend,
force=force, proton_mmq_flag=proton_mmq_flag, colour_order=colour_order)
- # For R1rho models, interpolate theta through spin-lock offset rather
than spin-lock field strength.
- plot_disp_curves_r1rho(dir=dir, num_points=num_points, extend=extend,
force=force, proton_mmq_flag=proton_mmq_flag, colour_order=colour_order)
+ # For R1rho models, interpolate through spin-lock field strength, and
plot R1rho R2 as function of effective field in rotating frame w_eff.
+ if cdp.exp_type_list == [EXP_TYPE_R1RHO]:
+ plot_disp_curves_r1rho_r2_as_func_of_w_eff(dir=dir,
num_points=num_points, extend=extend, force=force,
proton_mmq_flag=proton_mmq_flag, colour_order=colour_order)
# Write a python "grace to PNG/EPS/SVG..." conversion script.
# Open the file for writing.
@@ -1703,7 +1704,7 @@
add_result_file(type='grace', label='Grace', file=file_path)
-def plot_disp_curves_r1rho(dir=None, num_points=None, extend=None,
force=None, proton_mmq_flag=None, colour_order=None):
+def plot_disp_curves_r1rho_r2_as_func_of_w_eff(dir=None, num_points=None,
extend=None, force=None, proton_mmq_flag=None, colour_order=None):
"""Custom 2D Grace plotting function for the dispersion curves,
interpolating theta through spin-lock offset rather than spin-lock field
strength.
One file will be created per spin system.
@@ -1728,9 +1729,6 @@
# Skip protons for MMQ data.
if spin.model in MODEL_LIST_MMQ and spin.isotope == '1H':
continue
- # Skip for spin not in model list of r1rho models.
- elif spin.model not in [MODEL_DPL94, MODEL_TP02, MODEL_TAP03,
MODEL_MP05, MODEL_NS_R1RHO_2SITE]:
- continue
# Initialise some data structures.
data = []
@@ -1749,7 +1747,7 @@
interpolated_flag = False
# The unique file name.
- file_name = "theta%s.agr" % spin_id.replace('#',
'_').replace(':', '_').replace('@', '_')
+ file_name = "r1rho_r2_as_func_of_w_eff%s.agr" %
spin_id.replace('#', '_').replace(':', '_').replace('@', '_')
if not spin.model in [MODEL_R2EFF]:
# Interpolate through disp points.
@@ -1757,6 +1755,16 @@
else:
back_calc = None
+ spin_lock_nu1_new = None
+
+ # Number of spectrometer fields.
+ fields = [None]
+ field_count = 1
+ if hasattr(cdp, 'spectrometer_frq_count'):
+ fields = cdp.spectrometer_frq_list
+ field_count = cdp.spectrometer_frq_count
+
+ chemical_shifts, spin_lock_fields_inter, offsets_inter,
tilt_angles_inter, Delta_omega_inter, w_eff_inter =
return_offset_data(spins=[spin], spin_ids=[spin_id],
field_count=field_count, fields=spin_lock_nu1_new)
# Open the file for writing.
file_path = get_file_path(file_name, dir)
_______________________________________________
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