mailr7094 - /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 August 08, 2008 - 06:12:
Author: bugman
Date: Thu Aug  7 21:53:33 2008
New Revision: 7094

URL: http://svn.gna.org/viewcvs/relax?rev=7094&view=rev
Log:
Modified the create_data() method to use the unimplemented base_data_loop() 
generator method.


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=7094&r1=7093&r2=7094&view=diff
==============================================================================
--- 1.3/generic_fns/monte_carlo.py (original)
+++ 1.3/generic_fns/monte_carlo.py Thu Aug  7 21:53:33 2008
@@ -64,7 +64,7 @@
         raise RelaxError, "The simulation creation method " + `method` + " 
is not valid."
 
     # Specific Monte Carlo data creation, data return, and error return 
function setup.
-    num_models = get_specific_fn('num_instances', cdp.pipe_type)
+    base_data_loop = get_specific_fn('base_data_loop', cdp.pipe_type)
     if method == 'back_calc':
         create_mc_data = get_specific_fn('create_mc_data', cdp.pipe_type)
     return_data = get_specific_fn('return_data', cdp.pipe_type)
@@ -72,17 +72,17 @@
     pack_sim_data = get_specific_fn('pack_sim_data', cdp.pipe_type)
 
     # Loop over the models.
-    for model_index in xrange(num_models()):
+    for data_index in base_data_loop():
         # Create the Monte Carlo data.
         if method == 'back_calc':
-            data = create_mc_data(model_index)
+            data = create_mc_data(data_index)
 
         # Get the original data.
         else:
-            data = return_data(model_index)
+            data = return_data(data_index)
 
         # Get the errors.
-        error = return_error(model_index)
+        error = return_error(data_index)
 
         # Loop over the Monte Carlo simulations.
         random = []
@@ -99,7 +99,7 @@
                 random[j].append(gauss(data[k], error[k]))
 
         # Pack the simulation data.
-        pack_sim_data(model_index, random)
+        pack_sim_data(data_index, random)
 
 
 def error_analysis(prune=0.0):




Related Messages


Powered by MHonArc, Updated Fri Aug 08 07:00:20 2008