mailr6628 - /1.3/generic_fns/model_selection.py


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

Header


Content

Posted by edward on July 03, 2008 - 22:17:
Author: bugman
Date: Thu Jul  3 22:17:07 2008
New Revision: 6628

URL: http://svn.gna.org/viewcvs/relax?rev=6628&view=rev
Log:
Added some pipe switching to the model selection code.

The current pipe at the start is stored, and then restored at the end.


Modified:
    1.3/generic_fns/model_selection.py

Modified: 1.3/generic_fns/model_selection.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/model_selection.py?rev=6628&r1=6627&r2=6628&view=diff
==============================================================================
--- 1.3/generic_fns/model_selection.py (original)
+++ 1.3/generic_fns/model_selection.py Thu Jul  3 22:17:07 2008
@@ -120,6 +120,9 @@
     if pipes == None:
         # Get all data pipe names from the relax data store.
         pipes = ds.keys()
+
+    # Store the current data pipe (for restoration at the end).
+    current_pipe = ds.current_pipe
 
     # Select the model selection technique.
     if method == 'AIC':
@@ -296,8 +299,15 @@
                 best_crit = crit
 
         # Print out of selected model.
-        print "\nThe model from the run " + `best_model` + " has been 
selected."
+        print "\nThe model from the data pipe " + `best_model` + " has been 
selected."
+
+        # Switch to the selected data pipe.
+        switch(best_model)
 
         # Duplicate the data from the 'best_model' to the model selection 
data pipe.
         if best_model != None:
             duplicate_data[best_model](pipe_from=best_model, 
pipe_to=modsel_pipe, model_index=i, global_stats=global_stats)
+
+    # Restore the current data pipe.
+    ds.current_pipe = current_pipe
+




Related Messages


Powered by MHonArc, Updated Thu Jul 03 22:20:14 2008