mailr20438 - /branches/relax_disp/auto_analyses/relax_disp.py


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

Header


Content

Posted by edward on July 20, 2013 - 17:51:
Author: bugman
Date: Sat Jul 20 17:51:47 2013
New Revision: 20438

URL: http://svn.gna.org/viewcvs/relax?rev=20438&view=rev
Log:
Fix for the dispersion auto-analysis for when only the single R2eff model is 
optimised.

This is for the case of exponential curve fitting, and allows Monte Carlo 
simulations to proceed
even when the mc_sim_all_models flag is False.


Modified:
    branches/relax_disp/auto_analyses/relax_disp.py

Modified: branches/relax_disp/auto_analyses/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/auto_analyses/relax_disp.py?rev=20438&r1=20437&r2=20438&view=diff
==============================================================================
--- branches/relax_disp/auto_analyses/relax_disp.py (original)
+++ branches/relax_disp/auto_analyses/relax_disp.py Sat Jul 20 17:51:47 2013
@@ -211,7 +211,7 @@
         self.interpreter.minimise('simplex', func_tol=self.opt_func_tol, 
max_iter=self.opt_max_iterations, constraints=True)
 
         # Monte Carlo simulations.
-        if self.mc_sim_all_models:
+        if self.mc_sim_all_models or len(self.model_pipes) < 2:
             self.interpreter.monte_carlo.setup(number=self.mc_sim_num)
             self.interpreter.monte_carlo.create_data()
             self.interpreter.monte_carlo.initial_values()
@@ -226,7 +226,7 @@
         self.error_analysis()
 
         # Loop over the models.
-        model_pipes = []
+        self.model_pipes = []
         for model in self.models:
             # Printout.
             subtitle(file=sys.stdout, text="The '%s' model" % model, 
prespace=3)
@@ -237,7 +237,7 @@
             # The name of the data pipe for the model.
             model_pipe = model
             if model != 'R2eff':
-                model_pipes.append(model_pipe)
+                self.model_pipes.append(model_pipe)
 
             # Check that results do not already exist - i.e. a previous run 
was interrupted.
             path1 = path + sep + 'results'
@@ -280,9 +280,9 @@
             self.write_results(path=path, model=model)
 
         # The final model selection data pipe.
-        if len(model_pipes) >= 2:
+        if len(self.model_pipes) >= 2:
             # Perform model selection.
-            self.interpreter.model_selection(method=self.modsel, 
modsel_pipe='final', pipes=model_pipes)
+            self.interpreter.model_selection(method=self.modsel, 
modsel_pipe='final', pipes=self.model_pipes)
 
             # Final Monte Carlo simulations only.
             if not self.mc_sim_all_models:
@@ -297,7 +297,7 @@
 
         # No model selection.
         else:
-            warn(RelaxWarning("Model selection in the dispersion 
auto-analysis has been skipped as only %s models have been optimised." % 
len(model_pipes)))
+            warn(RelaxWarning("Model selection in the dispersion 
auto-analysis has been skipped as only %s models have been optimised." % 
len(self.model_pipes)))
 
         # Finally save the program state.
         self.interpreter.state.save(state='final_state', 
dir=self.results_dir, force=True)




Related Messages


Powered by MHonArc, Updated Mon Jul 22 08:40:02 2013