mailr19894 - in /branches/relax_disp: specific_analyses/relax_disp/disp_data.py user_functions/relax_disp.py


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

Header


Content

Posted by edward on June 06, 2013 - 16:57:
Author: bugman
Date: Thu Jun  6 16:57:13 2013
New Revision: 19894

URL: http://svn.gna.org/viewcvs/relax?rev=19894&view=rev
Log:
The reference spectra can now be set in the relax_disp.spin_lock_field user 
function.

By setting the field to None, the reference spectrum for a fixed relaxation 
time period experiment
type can now be specified.  This mimics the behaviour of the 
relax_disp.cpmg_frq user function.


Modified:
    branches/relax_disp/specific_analyses/relax_disp/disp_data.py
    branches/relax_disp/user_functions/relax_disp.py

Modified: branches/relax_disp/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/disp_data.py?rev=19894&r1=19893&r2=19894&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp/disp_data.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp/disp_data.py Thu Jun  6 
16:57:13 2013
@@ -676,7 +676,10 @@
         cdp.spin_lock_nu1_list = []
 
     # Add the frequency, converting to a float if needed.
-    cdp.spin_lock_nu1[spectrum_id] = float(field)
+    if field == None:
+        cdp.spin_lock_nu1[spectrum_id] = field
+    else:
+        cdp.spin_lock_nu1[spectrum_id] = float(field)
 
     # The unique curves for the R2eff fitting (R1rho).
     if cdp.spin_lock_nu1[spectrum_id] not in cdp.spin_lock_nu1_list:
@@ -689,4 +692,7 @@
         cdp.dispersion_points -= 1
 
     # Printout.
-    print("Setting the '%s' spectrum spin-lock field strength to %s kHz." % 
(spectrum_id, cdp.spin_lock_nu1[spectrum_id]/1000.0))
+    if field == None:
+        print("Setting the '%s' spectrum as the reference." % spectrum_id)
+    else:
+        print("Setting the '%s' spectrum spin-lock field strength to %s 
kHz." % (spectrum_id, cdp.spin_lock_nu1[spectrum_id]/1000.0))

Modified: branches/relax_disp/user_functions/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/user_functions/relax_disp.py?rev=19894&r1=19893&r2=19894&view=diff
==============================================================================
--- branches/relax_disp/user_functions/relax_disp.py (original)
+++ branches/relax_disp/user_functions/relax_disp.py Thu Jun  6 16:57:13 2013
@@ -641,7 +641,8 @@
     name = "field",
     py_type = "num",
     desc_short = "field strength nu1 (Hz)",
-    desc = "The spin-lock field strength, nu1, in Hz."
+    desc = "The spin-lock field strength, nu1, in Hz.",
+    can_be_none = True
 )
 # Description.
 uf.desc.append(Desc_container())




Related Messages


Powered by MHonArc, Updated Thu Jun 06 17:20:01 2013