mailr7266 - /1.3/generic_fns/monte_carlo.py


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

Header


Content

Posted by edward on September 24, 2008 - 19:15:
Author: bugman
Date: Wed Sep 24 19:15:52 2008
New Revision: 7266

URL: http://svn.gna.org/viewcvs/relax?rev=7266&view=rev
Log:
Modified the select_all_sims() function to use the model_loop().


Modified:
    1.3/generic_fns/monte_carlo.py

Modified: 1.3/generic_fns/monte_carlo.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/monte_carlo.py?rev=7266&r1=7265&r2=7266&view=diff
==============================================================================
--- 1.3/generic_fns/monte_carlo.py (original)
+++ 1.3/generic_fns/monte_carlo.py Wed Sep 24 19:15:52 2008
@@ -324,24 +324,25 @@
     cdp = ds[ds.current_pipe]
 
     # Specific number of instances and set the selected simulation array 
functions.
-    count_num_instances = get_specific_fn('num_instances', cdp.pipe_type)
+    model_loop = get_specific_fn('model_loop', cdp.pipe_type)
     set_selected_sim = get_specific_fn('set_selected_sim', cdp.pipe_type)
-
-    # Count the number of instances.
-    num_instances = count_num_instances()
 
     # Create the selected simulation array with all simulations selected.
     if all_select_sim == None:
         select_sim = ones(number, int)
 
-    # Loop over the instances.
-    for instance in xrange(num_instances):
+    # Loop over the models.
+    i = 0
+    for model_info in model_loop():
         # Set up the selected simulation array.
         if all_select_sim != None:
-            select_sim = all_select_sim[instance].tolist()
+            select_sim = all_select_sim[i].tolist()
 
         # Set the selected simulation array.
-        set_selected_sim(instance, select_sim)
+        set_selected_sim(model_info, select_sim)
+
+        # Model index.
+        i = i + 1
 
 
 def setup(number=None, all_select_sim=None):




Related Messages


Powered by MHonArc, Updated Wed Sep 24 19:20:01 2008