mailr22896 - /trunk/specific_analyses/relax_disp/sherekhan.py


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

Header


Content

Posted by tlinnet on April 30, 2014 - 17:30:
Author: tlinnet
Date: Wed Apr 30 17:30:31 2014
New Revision: 22896

URL: http://svn.gna.org/viewcvs/relax?rev=22896&view=rev
Log:
Added check for number of timepoints is 1.

bug #21995: (https://gna.org/bugs/index.php?21995) Creating sherekhan input 
files, with data for several fields and different time_T2.y

Modified:
    trunk/specific_analyses/relax_disp/sherekhan.py

Modified: trunk/specific_analyses/relax_disp/sherekhan.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/sherekhan.py?rev=22896&r1=22895&r2=22896&view=diff
==============================================================================
--- trunk/specific_analyses/relax_disp/sherekhan.py     (original)
+++ trunk/specific_analyses/relax_disp/sherekhan.py     Wed Apr 30 17:30:31 
2014
@@ -78,9 +78,14 @@
 
         # Loop over the magnetic fields.
         for exp_type, frq, ei, mi in loop_exp_frq(return_indices=True):
-            # Loop over the time.
+            # Loop over the time, and count it.
+            time_i = 0
             for time, ti in loop_time(exp_type=exp_type, frq=frq, 
return_indices=True):
-                pass
+                time_i += 1
+
+            # Check that not more than one time point is returned.
+            if time_i > 1:
+                raise RelaxError("Number of returned time poins is %i. Only 
1 time point is expected."%time_i)
 
             # The ShereKhan input file for the spin cluster.
             file_name = 'sherekhan_frq%s.in' % (mi+1)




Related Messages


Powered by MHonArc, Updated Wed Apr 30 17:40:02 2014