mailr19186 - in /branches/relax_disp: specific_analyses/ test_suite/system_tests/scripts/ user_functions/


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

Header


Content

Posted by edward on March 27, 2013 - 13:47:
Author: bugman
Date: Wed Mar 27 13:47:48 2013
New Revision: 19186

URL: http://svn.gna.org/viewcvs/relax?rev=19186&view=rev
Log:
Ported r8339 from the old relax_disp branch into the new branch.

The commands used were:
svn merge -r8338:8339 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/relax_disp@r18123 .
svn merge -r8338:8339 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/relax_disp/specific_fns/@r18123
 specific_analyses

The code for the user_functions package was manually ported over.

.....
  r8339 | semor | 2009-01-08 17:48:13 +0100 (Thu, 08 Jan 2009) | 8 lines
  Changed paths:
     M /branches/relax_disp/prompt/relax_disp.py
     M /branches/relax_disp/specific_fns/relax_disp.py
     M 
/branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_fast.py
  
  Added the user function cpmg_delayT() which allows setting the CPMG 
constant time delay T used for
  the analysed dataset.
  
  This follows a post at:
  https://mail.gna.org/public/relax-devel/2009-01/msg00027.html
  (Message-id: <496583C7.6050607@xxxxxxxxx>)
.....


Modified:
    branches/relax_disp/specific_analyses/relax_disp.py
    
branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_fast.py
    branches/relax_disp/user_functions/relax_disp.py

Modified: branches/relax_disp/specific_analyses/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp.py?rev=19186&r1=19185&r2=19186&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp.py Wed Mar 27 13:47:48 
2013
@@ -205,6 +205,41 @@
 
         # Add the frequency at the correct position.
         cdp.cpmg_frqs[index] = frq
+
+
+    def cpmg_delayT(id=None, delayT=None):
+        """Set the CPMG constant time delay (T) of the experiment.
+
+        @keyword id:       The experimental identification string (allowing 
for multiple experiments
+                           per data pipe).
+        @type id:          str
+        @keyword delayT:   The CPMG constant time delay (T) in s.
+        @type delayT:      float
+        """
+
+        # Function intro text.
+        if self.__relax__.interpreter.intro:
+            text = sys.ps3 + "delayT("
+            text = text + "id=" + `id`
+            text = text + ", delayT=" + `delayT` + ")"
+            print text
+
+        # Test if the current data pipe exists.
+        pipes.test()
+
+        # Alias the current data pipe.
+        cdp = pipes.get_pipe()
+
+        # Set up the dictionnary data structure if it doesn't exist yet.
+        if not hasattr(cdp, 'delayT'):
+            cdp.delayT = {}
+
+        # Test the CPMG constant time delay (T) has not already been set.
+        if cdp.delayT.has_key(id):
+           raise RelaxError, "The CPMG constant time delay (T) for the 
experiment " + `id` + " has already been set."
+
+        # Set the CPMG constant time delay (T).
+        cdp.delayT[id] = delayT
 
 
     def create_mc_data(self, spin_id):

Modified: 
branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_fast.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_fast.py?rev=19186&r1=19185&r2=19186&view=diff
==============================================================================
--- 
branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_fast.py 
(original)
+++ 
branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_fast.py 
Wed Mar 27 13:47:48 2013
@@ -22,6 +22,9 @@
 
 # Relaxation dispersion magnetic field (in Hz).
 frq.set(id='600', frq=600.0 * 1e6)
+
+# Relaxation dispersion CPMG constant time delay T (in s).
+cpmg_delayT(id='600', delayT=0.020)
 
 # Relaxation dispersion CPMG frequencies (in Hz).
 cpmg_frq = [

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=19186&r1=19185&r2=19186&view=diff
==============================================================================
--- branches/relax_disp/user_functions/relax_disp.py (original)
+++ branches/relax_disp/user_functions/relax_disp.py Wed Mar 27 13:47:48 2013
@@ -36,6 +36,30 @@
 uf_class.title = "Class for relaxation curve fitting."
 uf_class.menu_text = "&relax_disp"
 uf_class.gui_icon = "relax.relax_disp"
+
+
+# The relax_disp.cpmg_delayT user function.
+uf = uf_info.add_uf('relax_disp.cpmg_delayT')
+uf.title = "Set the CPMG constant time delay (T) of the experiment."
+uf.title_short = "CPMG time delay."
+uf.add_keyarg(
+    name = "id",
+    py_type = "str",
+    desc_short = "experiment ID",
+    desc = "The experiment identification string."
+)
+uf.add_keyarg(
+    name = "delayT",
+    py_type = "float",
+    desc_short = "CPMG time delay",
+    desc = "The CPMG constant time delay (T) in s."
+)
+# Description.
+uf.desc.append(Desc_container())
+uf.desc[-1].add_paragraph("This allows the CPMG constant time delay (T) of a 
given experiment to be set.")
+uf.backend = relax_disp_obj._cpmg_delayT
+uf.menu_text = "&cpmg_delayT"
+uf.wizard_size = (800, 500)
 
 
 # The relax_disp.exp_type user function.




Related Messages


Powered by MHonArc, Updated Wed Mar 27 14:00:03 2013