mailr6772 - /1.3/sample_scripts/full_analysis.py


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

Header


Content

Posted by edward on July 05, 2008 - 23:50:
Author: bugman
Date: Sat Jul  5 23:50:05 2008
New Revision: 6772

URL: http://svn.gna.org/viewcvs/relax?rev=6772&view=rev
Log:
Fixes for the model_selection() method of the full_analysis.py script.

The model selection pipe must be deleted each time for the automatic 
CONV_LOOP looping to be
possible.


Modified:
    1.3/sample_scripts/full_analysis.py

Modified: 1.3/sample_scripts/full_analysis.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/sample_scripts/full_analysis.py?rev=6772&r1=6771&r2=6772&view=diff
==============================================================================
--- 1.3/sample_scripts/full_analysis.py (original)
+++ 1.3/sample_scripts/full_analysis.py Sat Jul  5 23:50:05 2008
@@ -189,7 +189,7 @@
             self.multi_model(local_tm=True)
 
             # Model selection.
-            self.model_selection(pipe='aic', dir=self.base_dir + 'aic')
+            self.model_selection(modsel_pipe='aic', dir=self.base_dir + 
'aic')
 
 
         # Diffusion models MII to MV.
@@ -263,7 +263,7 @@
                     self.multi_model()
 
                     # Model selection.
-                    self.model_selection(pipe='final', dir=self.base_dir + 
'aic')
+                    self.model_selection(modsel_pipe='final', 
dir=self.base_dir + 'aic')
 
                     # Final optimisation of all diffusion and model-free 
parameters.
                     fix('all', fixed=False)
@@ -324,7 +324,7 @@
             pipe.create('final', 'mf')
 
             # Model selection between MI to MV.
-            self.model_selection(pipe='final', write_flag=False)
+            self.model_selection(modsel_pipe='final', write_flag=False)
 
 
             # Monte Carlo simulations.
@@ -551,14 +551,16 @@
             results.read('results', DIFF_MODEL + '/round_' + `self.round - 
1` + '/opt')
 
 
-    def model_selection(self, pipe=None, dir=None, write_flag=True):
+    def model_selection(self, modsel_pipe=None, dir=None, write_flag=True):
         """Model selection function."""
 
         # Model elimination.
         eliminate()
 
-        # Model selection.
-        model_selection(method='AIC', modsel_pipe=pipe, pipes=self.pipes)
+        # Model selection (delete the model selection pipe if it already 
exists).
+        if ds.has_key(modsel_pipe):
+            pipe.delete(modsel_pipe)
+        model_selection(method='AIC', modsel_pipe=modsel_pipe, 
pipes=self.pipes)
 
         # Write the results.
         if write_flag:




Related Messages


Powered by MHonArc, Updated Sun Jul 06 01:20:27 2008