mailRe: r8415 - /branches/relax_disp/specific_fns/relax_disp.py


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

Header


Content

Posted by Edward d'Auvergne on January 12, 2009 - 14:35:
Hi,

I have a few small points below, but you may have already have caught these.


On Mon, Jan 12, 2009 at 2:27 PM,  <sebastien.morin.1@xxxxxxxxx> wrote:
Author: semor
Date: Mon Jan 12 14:27:11 2009
New Revision: 8415

URL: http://svn.gna.org/viewcvs/relax?rev=8415&view=rev
Log:
Added tests, print statements and other code to the relaxation dispersion 
specific functions.

Tests were proosed by Ed in a post at:
https://mail.gna.org/public/relax-devel/2009-01/msg00065.html
(Message-id: <7f080ed10901120107t4f1cd53ew51f498a45a38eade@xxxxxxxxxxxxxx>)


Modified:
   branches/relax_disp/specific_fns/relax_disp.py

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=8415&r1=8414&r2=8415&view=diff
==============================================================================
--- branches/relax_disp/specific_fns/relax_disp.py (original)
+++ branches/relax_disp/specific_fns/relax_disp.py Mon Jan 12 14:27:11 2009
@@ -245,6 +245,9 @@
        @type delayT:      float
        """

+        # Test if the current data pipe exists.
+        pipes.test
+

This should read:

    pipes.test()


        # Alias the current data pipe.
        cdp = pipes.get_pipe()

@@ -252,12 +255,26 @@
        if not hasattr(cdp, 'delayT'):
            cdp.delayT = {}

+        # Test if the pipe type is set to 'relax_disp'.
+        function_type = cdp.pipe_type
+        if function_type != 'relax_disp':
+            raise RelaxFuncSetupError, 
specific_setup.get_string(function_type)
+
+        # Test if sequence data is loaded.
+        if not exists_mol_res_spin_data():
+            raise RelaxNoSequenceError
+
+        # Make sure the experiment type is set to 'cpmg'.
+        if not cdp.exp_type == 'cpmg':
+            raise RelaxError, "To use the function cpmg_delay(), the 
experiment type must be set to 'cpmg'."
+

To make this future-proof, a better text message could be:

            raise RelaxError, "To use this user function, the
experiment type must be set to 'cpmg'."

So if the user function name changes in the distant future, then this
text will still be valid.

Regards,

Edward



Related Messages


Powered by MHonArc, Updated Tue Jan 13 00:00:20 2009