mailr7269 - /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:20:
Author: bugman
Date: Wed Sep 24 19:20:07 2008
New Revision: 7269

URL: http://svn.gna.org/viewcvs/relax?rev=7269&view=rev
Log:
Docstring and comment fixes for select_all_sims().


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=7269&r1=7268&r2=7269&view=diff
==============================================================================
--- 1.3/generic_fns/monte_carlo.py (original)
+++ 1.3/generic_fns/monte_carlo.py Wed Sep 24 19:20:07 2008
@@ -310,7 +310,43 @@
 
 
 def select_all_sims(number=None, all_select_sim=None):
-    """Set the select flag of all simulations of all instances to one.
+    """Set the select flag of all simulations of all models to one.
+
+    @keyword number:            The number of Monte Carlo simulations to set 
up.
+    @type number:               int
+    @keyword all_select_sim:    The selection status of the Monte Carlo 
simulations.  The first
+                                dimension of this matrix corresponds to the 
simulation and the
+                                second corresponds to the models.
+    @type all_select_sim:       numpy matrix (int)
+    """
+
+    # Alias the current data pipe.
+    cdp = ds[ds.current_pipe]
+
+    # Model loop and set the selected simulation array functions.
+    model_loop = get_specific_fn('model_loop', cdp.pipe_type)
+    set_selected_sim = get_specific_fn('set_selected_sim', cdp.pipe_type)
+
+    # Create the selected simulation array with all simulations selected.
+    if all_select_sim == None:
+        select_sim = ones(number, int)
+
+    # 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[i].tolist()
+
+        # Set the selected simulation array.
+        set_selected_sim(model_info, select_sim)
+
+        # Model index.
+        i = i + 1
+
+
+def setup(number=None, all_select_sim=None):
+    """Function for setting up Monte Carlo simulations.
 
     @keyword number:            The number of Monte Carlo simulations to set 
up.
     @type number:               int
@@ -320,42 +356,6 @@
     @type all_select_sim:       numpy matrix (int)
     """
 
-    # Alias the current data pipe.
-    cdp = ds[ds.current_pipe]
-
-    # Specific number of instances and set the selected simulation array 
functions.
-    model_loop = get_specific_fn('model_loop', cdp.pipe_type)
-    set_selected_sim = get_specific_fn('set_selected_sim', cdp.pipe_type)
-
-    # Create the selected simulation array with all simulations selected.
-    if all_select_sim == None:
-        select_sim = ones(number, int)
-
-    # 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[i].tolist()
-
-        # Set the selected simulation array.
-        set_selected_sim(model_info, select_sim)
-
-        # Model index.
-        i = i + 1
-
-
-def setup(number=None, all_select_sim=None):
-    """Function for setting up Monte Carlo simulations.
-
-    @keyword number:            The number of Monte Carlo simulations to set 
up.
-    @type number:               int
-    @keyword all_select_sim:    The selection status of the Monte Carlo 
simulations.  The first
-                                dimension of this matrix corresponds to the 
simulation and the
-                                second corresponds to the instance.
-    @type all_select_sim:       numpy matrix (int)
-    """
-
     # Test if the current data pipe exists.
     if not ds.current_pipe:
         raise RelaxNoPipeError




Related Messages


Powered by MHonArc, Updated Wed Sep 24 19:40:03 2008