mailRe: r8339 - in /branches/relax_disp: prompt/ specific_fns/ test_suite/system_tests/scripts/


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

Header


Content

Posted by Edward d'Auvergne on January 08, 2009 - 17:56:
Seb,

Do we need to associate delayT with different spectra?  Is it not the
same for all spectra from all field strengths?

Regards,

Edward


On Thu, Jan 8, 2009 at 5:48 PM,  <sebastien.morin.1@xxxxxxxxx> wrote:
Author: semor
Date: Thu Jan  8 17:48:13 2009
New Revision: 8339

URL: http://svn.gna.org/viewcvs/relax?rev=8339&view=rev
Log:
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/prompt/relax_disp.py
   branches/relax_disp/specific_fns/relax_disp.py
   
branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_fast.py

Modified: branches/relax_disp/prompt/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/prompt/relax_disp.py?rev=8339&r1=8338&r2=8339&view=diff
==============================================================================
--- branches/relax_disp/prompt/relax_disp.py (original)
+++ branches/relax_disp/prompt/relax_disp.py Thu Jan  8 17:48:13 2009
@@ -45,6 +45,42 @@

        # Place relax in the class namespace.
        self.__relax__ = relax
+
+
+    def cpmg_delayT(self, id=None, delayT=None):
+        """Set the CPMG constant time delay (T) of the experiment.
+
+        Keyword arguments
+        ~~~~~~~~~~~~~~~~~
+
+        id:  The experiment identification string.
+
+        delayT:   The CPMG constant time delay (T) in s.
+
+
+        Description
+        ~~~~~~~~~~~
+
+        This user function allows the CPMG constant time delay (T) of a 
given experiment to be set.
+        """
+
+        # Function intro text.
+        if self.__relax__.interpreter.intro:
+            text = sys.ps3 + "delayT("
+            text = text + "id=" + `id`
+            text = text + ", delayT=" + `delayT` + ")"
+            print text
+
+        # Id string.
+        if type(id) != str:
+            raise RelaxStrError, ('experiment identification string', id)
+
+        # The CPMG constant time delay (T).
+        if type(delayT) != float and type(delayT) != int:
+            raise RelaxNumError, ('CPMG constant time delay (T)', delayT)
+
+        # Execute the functional code.
+        specific_fns.relax_disp.cpmg_delayT(id=id, delayT=delayT)


    def exp_type(self, exp='cpmg'):

Modified: branches/relax_disp/specific_fns/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_fns/relax_disp.py?rev=8339&r1=8338&r2=8339&view=diff
==============================================================================
--- branches/relax_disp/specific_fns/relax_disp.py (original)
+++ branches/relax_disp/specific_fns/relax_disp.py Thu Jan  8 17:48:13 2009
@@ -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=8339&r1=8338&r2=8339&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 
Thu Jan  8 17:48:13 2009
@@ -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 = [


_______________________________________________
relax (http://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




Related Messages


Powered by MHonArc, Updated Thu Jan 08 20:40:44 2009