mailr22292 - /trunk/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 tlinnet on February 24, 2014 - 17:06:
Author: tlinnet
Date: Mon Feb 24 17:06:35 2014
New Revision: 22292

URL: http://svn.gna.org/viewcvs/relax?rev=22292&view=rev
Log:
Expanded the loop_time function to optional take the offset and dispersion 
point as input for restricting looping.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

This is implemented as suggested in: 
https://mail.gna.org/public/relax-devel/2014-02/msg00143.html

Modified:
    trunk/specific_analyses/relax_disp/disp_data.py

Modified: trunk/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=22292&r1=22291&r2=22292&view=diff
==============================================================================
--- trunk/specific_analyses/relax_disp/disp_data.py (original)
+++ trunk/specific_analyses/relax_disp/disp_data.py Mon Feb 24 17:06:35 2014
@@ -1281,13 +1281,17 @@
         yield id
 
 
-def loop_time(exp_type=None, frq=None, return_indices=False):
+def loop_time(exp_type=None, frq=None, offset=None, point=None, 
return_indices=False):
     """Generator method for looping over the relaxation times.
 
     @keyword exp_type:          The experiment type.
     @type exp_type:             str
     @keyword frq:               The spectrometer frequency in Hz.
     @type frq:                  float
+    @keyword offset:            The spin-lock or hard pulse offset value in 
ppm.
+    @type offset:               None or float
+    @keyword point:             The dispersion point data (either the 
spin-lock field strength in Hz or the nu_CPMG frequency in Hz).
+    @type point:                float
     @keyword return_indices:    A flag which if True will cause the 
relaxation time index to be returned as well.
     @type return_indices:       bool
     @return:                    The relaxation time.
@@ -1310,6 +1314,25 @@
                 # Skip non-matching spectrometer frequencies.
                 if frq != None and hasattr(cdp, 'spectrometer_frq') and 
cdp.spectrometer_frq[id] != frq:
                     continue
+
+                # Skip non-matching offsets.
+                if offset != None and hasattr(cdp, 'spin_lock_offset') and 
cdp.spin_lock_offset[id] != offset:
+                    continue
+
+                # The dispersion point filter.
+                if point != None:
+                    # No experiment type set.
+                    if not hasattr(cdp, 'exp_type') or id not in 
cdp.exp_type:
+                        continue
+
+                    # The experiment type.
+                    exp_type = cdp.exp_type[id]
+
+                    # The CPMG dispersion data.
+                    if exp_type in EXP_TYPE_LIST_CPMG:
+                        # No dispersion point data set.
+                        if not hasattr(cdp, 'cpmg_frqs') or id not in 
cdp.cpmg_frqs:
+                            continue
 
                 if time != cdp.relax_times[id]:
                     continue




Related Messages


Powered by MHonArc, Updated Mon Feb 24 17:20:02 2014