mailr5735 - /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 April 15, 2008 - 22:28:
Author: bugman
Date: Tue Apr 15 22:28:37 2008
New Revision: 5735

URL: http://svn.gna.org/viewcvs/relax?rev=5735&view=rev
Log:
Some fixes for the model selection select() function - pipe switching was 
necessary.


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=5735&r1=5734&r2=5735&view=diff
==============================================================================
--- 1.3/generic_fns/model_selection.py (original)
+++ 1.3/generic_fns/model_selection.py Tue Apr 15 22:28:37 2008
@@ -27,7 +27,7 @@
 # relax module imports.
 from data import Data as relax_data_store
 from generic_fns.selection import same_sequence
-import pipes
+from pipes import copy, switch
 from relax_errors import RelaxDiffSeqError, RelaxError, RelaxNoPipeError, 
RelaxNoSequenceError
 from specific_fns.setup import get_specific_fn
 
@@ -186,6 +186,9 @@
 
             # Loop over the nested array.
             for j in xrange(len(pipes[i])):
+                # Switch pipes.
+                switch(pipes[i][j])
+
                 # Number of instances.
                 num = count_num_instances[pipes[i][j]]()
                 num_instances[i].append(num)
@@ -196,6 +199,9 @@
 
         # All other model selection techniques.
         else:
+            # Switch pipes.
+            switch(pipes[i])
+
             # Number of instances.
             num = count_num_instances[pipes[i]]()
             num_instances.append(num)
@@ -228,7 +234,7 @@
                     pipe = pipes[j][k]
 
                     # Switch to this pipe.
-                    pipes.switch(pipe)
+                    switch(pipe)
 
                     # Skip function.
                     if skip_function[pipe](instance=i):
@@ -253,7 +259,7 @@
                 pipe = pipes[j]
 
                 # Switch to this pipe.
-                pipes.switch(pipe)
+                switch(pipe)
 
                 # Skip function.
                 if skip_function[pipe](instance=i, 
min_instances=min_instances, num_instances=num_instances[j]):
@@ -288,4 +294,5 @@
 
         # Duplicate the data from the 'best_model' to the model selection 
data pipe.
         if best_model != None:
-            pipes.copy(best_model, modsel_pipe)
+            copy(best_model, modsel_pipe)
+            raise NameError, best_model




Related Messages


Powered by MHonArc, Updated Tue Apr 15 23:00:19 2008