mailr19658 - /branches/relax_disp/specific_analyses/relax_disp/disp_data.py


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

Header


Content

Posted by edward on May 03, 2013 - 21:48:
Author: bugman
Date: Fri May  3 21:48:55 2013
New Revision: 19658

URL: http://svn.gna.org/viewcvs/relax?rev=19658&view=rev
Log:
Added the return_cpmg_frqs() and return_spin_lock_nu1() functions to 
specific_analyses.relax_disp.disp_data.


Modified:
    branches/relax_disp/specific_analyses/relax_disp/disp_data.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=19658&r1=19657&r2=19658&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp/disp_data.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp/disp_data.py Fri May  3 
21:48:55 2013
@@ -253,6 +253,30 @@
 
     # Printout.
     print("Setting the '%s' spectrum relaxation time period to %s s." % 
(spectrum_id, cdp.relax_times[spectrum_id]))
+
+
+def return_cpmg_frqs(ref_flag=True):
+    """Return the list of nu_CPMG frequencies.
+
+    @keyword ref_flag:  A flag which if False will cause the reference 
spectrum frequency of None to be removed from the list.
+    @type ref_flag:     bool
+    @return:            The list of nu_CPMG frequencies in Hz.
+    @rtype:             list of float
+    """
+
+    # Initialise.
+    cpmg_frqs = []
+
+    # Loop over the frequencies.
+    for frq in cdp.cpmg_frqs_list:
+        if frq == None and not ref_flag:
+            continue
+
+        # Add the frequency.
+        cpmg_frqs.append(frq)
+
+    # Return the new list.
+    return cpmg_frqs
 
 
 def return_intensity(spin=None, frq=None, point=None, time=None, ref=False):
@@ -315,6 +339,30 @@
     raise RelaxError("No key could be found corresponding to the 
spectrometer frequency %s, dispersion point %s and relaxation time %s." % 
(frq, point, time))
 
 
+def return_spin_lock_nu1(ref_flag=True):
+    """Return the list of spin-lock field strengths.
+
+    @keyword ref_flag:  A flag which if False will cause the reference 
spectrum frequency of None to be removed from the list.
+    @type ref_flag:     bool
+    @return:            The list of spin-lock field strengths in Hz.
+    @rtype:             list of float
+    """
+
+    # Initialise.
+    nu1 = []
+
+    # Loop over the frequencies.
+    for frq in cdp.spin_lock_nu1_list:
+        if frq == None and not ref_flag:
+            continue
+
+        # Add the frequency.
+        nu1.append(frq)
+
+    # Return the new list.
+    return nu1
+
+
 def spin_lock_field(spectrum_id=None, field=None):
     """Set the spin-lock field strength (nu1) for the given spectrum.
 




Related Messages


Powered by MHonArc, Updated Fri May 03 22:00:01 2013