Author: bugman Date: Tue Jun 5 10:39:44 2012 New Revision: 16659 URL: http://svn.gna.org/viewcvs/relax?rev=16659&view=rev Log: The 'bundle' arg is now functional in the model_selection user function back end. Modified: branches/uf_redesign/generic_fns/model_selection.py Modified: branches/uf_redesign/generic_fns/model_selection.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/generic_fns/model_selection.py?rev=16659&r1=16658&r2=16659&view=diff ============================================================================== --- branches/uf_redesign/generic_fns/model_selection.py (original) +++ branches/uf_redesign/generic_fns/model_selection.py Tue Jun 5 10:39:44 2012 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2003-2004, 2007-2008 Edward d'Auvergne # +# Copyright (C) 2003-2012 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -27,7 +27,8 @@ from math import log # relax module imports. -from pipes import get_type, has_pipe, pipe_names, switch +import generic_fns.pipes +from generic_fns.pipes import get_type, has_pipe, pipe_names, switch from relax_errors import RelaxError, RelaxPipeError from specific_fns.setup import get_specific_fn @@ -102,7 +103,7 @@ return chi2 + k * log(n) -def select(method=None, modsel_pipe=None, pipes=None): +def select(method=None, modsel_pipe=None, bundle=None, pipes=None): """Model selection function. @keyword method: The model selection method. This can currently be one of: @@ -112,9 +113,10 @@ - 'CV', Single-item-out cross-validation. None of the other model selection techniques are currently supported. @type method: str - @keyword modsel_pipe: The name of the new data pipe to be created by copying of the selected - data pipe. + @keyword modsel_pipe: The name of the new data pipe to be created by copying of the selected data pipe. @type modsel_pipe: str + @keyword bundle: The optional data pipe bundle to associate the newly created pipe with. + @type bundle: str or None @keyword pipes: A list of the data pipes to use in the model selection. @type pipes: list of str """ @@ -307,3 +309,7 @@ # Switch to the model selection pipe. if modsel_pipe_exists: switch(modsel_pipe) + + # Bundle the data pipe. + if bundle: + generic_fns.pipes.bundle(bundle=bundle, pipe=modsel_pipe)