r22256 - /trunk/specific_analyses/relax_disp/disp_data.py
Author: tlinnet Date: Mon Feb 24 09:13:39 2014 New Revision: 22256 URL: http://svn.gna.org/viewcvs/relax?rev=22256view=rev Log: Reverted the ordering of dispersion point and relaxation time. Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis with two fields at two delay times. The ordering of the dispersion and relaxation time follow a strict pattern as explained in: http://thread.gmane.org/gmane.science.nmr.relax.devel/5070. The looping is done over first the dispersion points, before the time points. Modified: trunk/specific_analyses/relax_disp/disp_data.py Modified: trunk/specific_analyses/relax_disp/disp_data.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=22256r1=22255r2=22256view=diff == --- trunk/specific_analyses/relax_disp/disp_data.py (original) +++ trunk/specific_analyses/relax_disp/disp_data.py Mon Feb 24 09:13:39 2014 @@ -870,10 +870,10 @@ for frq, mi in loop_frq(return_indices=True): # Then loop over the offset data. for offset, oi in loop_offset(exp_type=exp_type, frq=frq, return_indices=True): -# Then the relaxation times. -for time, ti in loop_time(return_indices=True): -# Finally the dispersion points. -for point, di in loop_point(exp_type=exp_type, frq=frq, offset=offset, time=time, return_indices=True): +# Then the dispersion points. +for point, di in loop_point(exp_type=exp_type, frq=frq, offset=offset, return_indices=True): +# Finally the relaxation times. +for time, ti in loop_time(return_indices=True): # Yield the data. if return_indices: yield exp_type, frq, offset, point, time, ei, mi, oi, di, ti ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22258 - in /trunk/test_suite/gui_tests: __init__.py general.py
Author: bugman Date: Mon Feb 24 09:51:06 2014 New Revision: 22258 URL: http://svn.gna.org/viewcvs/relax?rev=22258view=rev Log: Created the General.test_bug_21720_pipe_switching_with_tab_closure GUI test. This is to catch bug #21720 (https://gna.org/bugs/?21720), the failure to set the current data pipe in the GUI when the current and non-last analysis tab is closed. The test replicates the steps as outlined in the bug report. Added: trunk/test_suite/gui_tests/general.py Modified: trunk/test_suite/gui_tests/__init__.py Modified: trunk/test_suite/gui_tests/__init__.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/__init__.py?rev=22258r1=22257r2=22258view=diff == --- trunk/test_suite/gui_tests/__init__.py (original) +++ trunk/test_suite/gui_tests/__init__.py Mon Feb 24 09:51:06 2014 @@ -1,6 +1,6 @@ ### # # -# Copyright (C) 2006-2013 Edward d'Auvergne # +# Copyright (C) 2006-2014 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -36,6 +36,7 @@ from test_suite.gui_tests.consistency_tests import Ct from test_suite.gui_tests.dead_uf_pages import Dead_uf_pages from test_suite.gui_tests.frame_order import Frame_order +from test_suite.gui_tests.general import General from test_suite.gui_tests.interatomic import Interatomic from test_suite.gui_tests.jw_mapping import Jw_mapping from test_suite.gui_tests.model_free import Mf @@ -51,6 +52,7 @@ __all__ = ['bmrb', 'consistency_tests', + 'gui', 'interatomic', 'jw_mapping', 'model_free', @@ -118,6 +120,7 @@ suite_array.append(TestLoader().loadTestsFromTestCase(Ct)) suite_array.append(TestLoader().loadTestsFromTestCase(Dead_uf_pages)) suite_array.append(TestLoader().loadTestsFromTestCase(Frame_order)) +suite_array.append(TestLoader().loadTestsFromTestCase(General)) suite_array.append(TestLoader().loadTestsFromTestCase(Interatomic)) suite_array.append(TestLoader().loadTestsFromTestCase(Jw_mapping)) suite_array.append(TestLoader().loadTestsFromTestCase(Mf)) Added: trunk/test_suite/gui_tests/general.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/general.py?rev=22258view=auto == --- trunk/test_suite/gui_tests/general.py (added) +++ trunk/test_suite/gui_tests/general.py Mon Feb 24 09:51:06 2014 @@ -1,0 +1,81 @@ +### +# # +# Copyright (C) 2014 Edward d'Auvergne# +# # +# This file is part of the program relax (http://www.nmr-relax.com). # +# # +# This program is free software: you can redistribute it and/or modify# +# it under the terms of the GNU General Public License as published by# +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details.# +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +### + +# Module docstring. +Generic GUI tests. + +# relax module imports. +from pipe_control.pipes import cdp_name +from status import Status; status = Status() +from test_suite.gui_tests.base_classes import GuiTestCase + +# relax GUI imports. +from gui.string_conv import str_to_gui + + +class General(GuiTestCase): +Class for testing general GUI operations. + +def
r22259 - in /branches/double_rotor: ./ test_suite/gui_tests/__init__.py test_suite/gui_tests/general.py
Author: bugman Date: Mon Feb 24 09:52:35 2014 New Revision: 22259 URL: http://svn.gna.org/viewcvs/relax?rev=22259view=rev Log: Merged revisions 22258 via svnmerge from svn+ssh://bug...@svn.gna.org/svn/relax/trunk r22258 | bugman | 2014-02-24 09:51:06 +0100 (Mon, 24 Feb 2014) | 7 lines Created the General.test_bug_21720_pipe_switching_with_tab_closure GUI test. This is to catch bug #21720 (https://gna.org/bugs/?21720), the failure to set the current data pipe in the GUI when the current and non-last analysis tab is closed. The test replicates the steps as outlined in the bug report. Added: branches/double_rotor/test_suite/gui_tests/general.py - copied unchanged from r22258, trunk/test_suite/gui_tests/general.py Modified: branches/double_rotor/ (props changed) branches/double_rotor/test_suite/gui_tests/__init__.py Propchange: branches/double_rotor/ -- --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Feb 24 09:52:35 2014 @@ -1,1 +1,1 @@ -/trunk:1-22256 +/trunk:1-22258 Modified: branches/double_rotor/test_suite/gui_tests/__init__.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/test_suite/gui_tests/__init__.py?rev=22259r1=22258r2=22259view=diff == --- branches/double_rotor/test_suite/gui_tests/__init__.py (original) +++ branches/double_rotor/test_suite/gui_tests/__init__.py Mon Feb 24 09:52:35 2014 @@ -1,6 +1,6 @@ ### # # -# Copyright (C) 2006-2013 Edward d'Auvergne # +# Copyright (C) 2006-2014 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -36,6 +36,7 @@ from test_suite.gui_tests.consistency_tests import Ct from test_suite.gui_tests.dead_uf_pages import Dead_uf_pages from test_suite.gui_tests.frame_order import Frame_order +from test_suite.gui_tests.general import General from test_suite.gui_tests.interatomic import Interatomic from test_suite.gui_tests.jw_mapping import Jw_mapping from test_suite.gui_tests.model_free import Mf @@ -51,6 +52,7 @@ __all__ = ['bmrb', 'consistency_tests', + 'gui', 'interatomic', 'jw_mapping', 'model_free', @@ -118,6 +120,7 @@ suite_array.append(TestLoader().loadTestsFromTestCase(Ct)) suite_array.append(TestLoader().loadTestsFromTestCase(Dead_uf_pages)) suite_array.append(TestLoader().loadTestsFromTestCase(Frame_order)) +suite_array.append(TestLoader().loadTestsFromTestCase(General)) suite_array.append(TestLoader().loadTestsFromTestCase(Interatomic)) suite_array.append(TestLoader().loadTestsFromTestCase(Jw_mapping)) suite_array.append(TestLoader().loadTestsFromTestCase(Mf)) ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22260 - in /trunk: data_store/ specific_analyses/
Author: bugman Date: Mon Feb 24 09:56:30 2014 New Revision: 22260 URL: http://svn.gna.org/viewcvs/relax?rev=22260view=rev Log: Fix for bug #21716 (https://gna.org/bugs/?21716). This is the failure to save the relax state just after deleting the current data pipe, even if other data pipes exist. The problem was that the specific analysis functions data_names() and return_data_desc() were being retrieved using the current data pipe rather than the actual data pipe that the data structures belong to. So if the current data pipe is None, then these fail. Now the data pipe type is being passed through all of the to_xml() methods so that the correct data_names() and return_data_desc() methods are retrieved. Modified: trunk/data_store/__init__.py trunk/data_store/interatomic.py trunk/data_store/mol_res_spin.py trunk/data_store/pipe_container.py trunk/specific_analyses/hybrid.py Modified: trunk/data_store/__init__.py URL: http://svn.gna.org/viewcvs/relax/trunk/data_store/__init__.py?rev=22260r1=22259r2=22260view=diff == --- trunk/data_store/__init__.py (original) +++ trunk/data_store/__init__.py Mon Feb 24 09:56:30 2014 @@ -1,6 +1,6 @@ ### # # -# Copyright (C) 2003-2013 Edward d'Auvergne # +# Copyright (C) 2003-2014 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -615,7 +615,7 @@ pipe_element.setAttribute('type', self[pipe].pipe_type) # Fill the data pipe XML element. -self[pipe].to_xml(xmldoc, pipe_element) +self[pipe].to_xml(xmldoc, pipe_element, pipe_type=self[pipe].pipe_type) # Write out the XML file. file.write(xmldoc.toprettyxml(indent='')) Modified: trunk/data_store/interatomic.py URL: http://svn.gna.org/viewcvs/relax/trunk/data_store/interatomic.py?rev=22260r1=22259r2=22260view=diff == --- trunk/data_store/interatomic.py (original) +++ trunk/data_store/interatomic.py Mon Feb 24 09:56:30 2014 @@ -1,6 +1,6 @@ ### # # -# Copyright (C) 2007-2013 Edward d'Auvergne # +# Copyright (C) 2007-2014 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -191,18 +191,20 @@ xml_to_object(interatom_node, self[-1], file_version=file_version) -def to_xml(self, doc, element): +def to_xml(self, doc, element, pipe_type=None): Create XML elements for each spin. -@param doc: The XML document object. -@type doc: xml.dom.minidom.Document instance -@param element: The element to add the spin XML elements to. -@type element: XML element object +@param doc: The XML document object. +@type doc: xml.dom.minidom.Document instance +@param element: The element to add the spin XML elements to. +@type element: XML element object +@keyword pipe_type: The type of the pipe being converted to XML. +@type pipe_type:str # Get the specific functions. -data_names = specific_analyses.setup.get_specific_fn('data_names', pipe_control.pipes.get_type(), raise_error=False) -return_data_desc = specific_analyses.setup.get_specific_fn('return_data_desc', pipe_control.pipes.get_type(), raise_error=False) +data_names = specific_analyses.setup.get_specific_fn('data_names', pipe_type, raise_error=False) +return_data_desc = specific_analyses.setup.get_specific_fn('return_data_desc', pipe_type, raise_error=False) # Loop over the containers. for i in range(len(self)): Modified: trunk/data_store/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/trunk/data_store/mol_res_spin.py?rev=22260r1=22259r2=22260view=diff == --- trunk/data_store/mol_res_spin.py (original) +++ trunk/data_store/mol_res_spin.py Mon Feb 24 09:56:30 2014 @@ -1,6 +1,6 @@ ### #
r22261 - in /branches/double_rotor: ./ data_store/ specific_analyses/
Author: bugman Date: Mon Feb 24 10:00:57 2014 New Revision: 22261 URL: http://svn.gna.org/viewcvs/relax?rev=22261view=rev Log: Merged revisions 22260 via svnmerge from svn+ssh://bug...@svn.gna.org/svn/relax/trunk r22260 | bugman | 2014-02-24 09:56:30 +0100 (Mon, 24 Feb 2014) | 12 lines Fix for bug #21716 (https://gna.org/bugs/?21716). This is the failure to save the relax state just after deleting the current data pipe, even if other data pipes exist. The problem was that the specific analysis functions data_names() and return_data_desc() were being retrieved using the current data pipe rather than the actual data pipe that the data structures belong to. So if the current data pipe is None, then these fail. Now the data pipe type is being passed through all of the to_xml() methods so that the correct data_names() and return_data_desc() methods are retrieved. Modified: branches/double_rotor/ (props changed) branches/double_rotor/data_store/__init__.py branches/double_rotor/data_store/interatomic.py branches/double_rotor/data_store/mol_res_spin.py branches/double_rotor/data_store/pipe_container.py branches/double_rotor/specific_analyses/hybrid.py Propchange: branches/double_rotor/ -- --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Feb 24 10:00:57 2014 @@ -1,1 +1,1 @@ -/trunk:1-22258 +/trunk:1-22260 Modified: branches/double_rotor/data_store/__init__.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/data_store/__init__.py?rev=22261r1=22260r2=22261view=diff == --- branches/double_rotor/data_store/__init__.py (original) +++ branches/double_rotor/data_store/__init__.py Mon Feb 24 10:00:57 2014 @@ -1,6 +1,6 @@ ### # # -# Copyright (C) 2003-2013 Edward d'Auvergne # +# Copyright (C) 2003-2014 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -615,7 +615,7 @@ pipe_element.setAttribute('type', self[pipe].pipe_type) # Fill the data pipe XML element. -self[pipe].to_xml(xmldoc, pipe_element) +self[pipe].to_xml(xmldoc, pipe_element, pipe_type=self[pipe].pipe_type) # Write out the XML file. file.write(xmldoc.toprettyxml(indent='')) Modified: branches/double_rotor/data_store/interatomic.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/data_store/interatomic.py?rev=22261r1=22260r2=22261view=diff == --- branches/double_rotor/data_store/interatomic.py (original) +++ branches/double_rotor/data_store/interatomic.py Mon Feb 24 10:00:57 2014 @@ -1,6 +1,6 @@ ### # # -# Copyright (C) 2007-2013 Edward d'Auvergne # +# Copyright (C) 2007-2014 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -191,18 +191,20 @@ xml_to_object(interatom_node, self[-1], file_version=file_version) -def to_xml(self, doc, element): +def to_xml(self, doc, element, pipe_type=None): Create XML elements for each spin. -@param doc: The XML document object. -@type doc: xml.dom.minidom.Document instance -@param element: The element to add the spin XML elements to. -@type element: XML element object +@param doc: The XML document object. +@type doc: xml.dom.minidom.Document instance +@param element: The element to add the spin XML elements to. +@type element: XML element object +@keyword pipe_type: The type of the pipe being converted to XML. +@type pipe_type:str # Get the specific functions. -data_names = specific_analyses.setup.get_specific_fn('data_names', pipe_control.pipes.get_type(), raise_error=False) -return_data_desc = specific_analyses.setup.get_specific_fn('return_data_desc', pipe_control.pipes.get_type(), raise_error=False) +data_names =
r22262 - /trunk/auto_analyses/relax_disp.py
Author: bugman Date: Mon Feb 24 10:38:54 2014 New Revision: 22262 URL: http://svn.gna.org/viewcvs/relax?rev=22262view=rev Log: Fix for a bug introduced at r22250. The method is called name_pipe(), not pipe_name which is a variable. Modified: trunk/auto_analyses/relax_disp.py Modified: trunk/auto_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_disp.py?rev=22262r1=22261r2=22262view=diff == --- trunk/auto_analyses/relax_disp.py (original) +++ trunk/auto_analyses/relax_disp.py Mon Feb 24 10:38:54 2014 @@ -457,7 +457,7 @@ # Copy the R2eff values from the R2eff model data pipe. if model != MODEL_R2EFF and MODEL_R2EFF in self.models: - self.interpreter.value.copy(pipe_from=self.pipe_name(MODEL_R2EFF), pipe_to=model_pipe, param='r2eff') + self.interpreter.value.copy(pipe_from=self.name_pipe(MODEL_R2EFF), pipe_to=model_pipe, param='r2eff') # Calculate the R2eff values for the fixed relaxation time period data types. if model == MODEL_R2EFF and not has_exponential_exp_type(): ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22263 - in /branches/double_rotor: ./ auto_analyses/relax_disp.py
Author: bugman Date: Mon Feb 24 10:41:43 2014 New Revision: 22263 URL: http://svn.gna.org/viewcvs/relax?rev=22263view=rev Log: Merged revisions 22262 via svnmerge from svn+ssh://bug...@svn.gna.org/svn/relax/trunk r22262 | bugman | 2014-02-24 10:38:54 +0100 (Mon, 24 Feb 2014) | 5 lines Fix for a bug introduced at r22250. The method is called name_pipe(), not pipe_name which is a variable. Modified: branches/double_rotor/ (props changed) branches/double_rotor/auto_analyses/relax_disp.py Propchange: branches/double_rotor/ -- --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Feb 24 10:41:43 2014 @@ -1,1 +1,1 @@ -/trunk:1-22260 +/trunk:1-22262 Modified: branches/double_rotor/auto_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/auto_analyses/relax_disp.py?rev=22263r1=22262r2=22263view=diff == --- branches/double_rotor/auto_analyses/relax_disp.py (original) +++ branches/double_rotor/auto_analyses/relax_disp.py Mon Feb 24 10:41:43 2014 @@ -457,7 +457,7 @@ # Copy the R2eff values from the R2eff model data pipe. if model != MODEL_R2EFF and MODEL_R2EFF in self.models: - self.interpreter.value.copy(pipe_from=self.pipe_name(MODEL_R2EFF), pipe_to=model_pipe, param='r2eff') + self.interpreter.value.copy(pipe_from=self.name_pipe(MODEL_R2EFF), pipe_to=model_pipe, param='r2eff') # Calculate the R2eff values for the fixed relaxation time period data types. if model == MODEL_R2EFF and not has_exponential_exp_type(): ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22264 - /trunk/gui/analyses/__init__.py
Author: bugman Date: Mon Feb 24 10:41:44 2014 New Revision: 22264 URL: http://svn.gna.org/viewcvs/relax?rev=22264view=rev Log: Fix for bug #21720 (https://gna.org/bugs/?21720). This is the faulty pipe switching behaviour when a non-last analysis tab is deleted in the GUI. Now the correct data pipe should be always switched to when closing an analysis tab. Modified: trunk/gui/analyses/__init__.py Modified: trunk/gui/analyses/__init__.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/analyses/__init__.py?rev=22264r1=22263r2=22264view=diff == --- trunk/gui/analyses/__init__.py (original) +++ trunk/gui/analyses/__init__.py Mon Feb 24 10:41:44 2014 @@ -1,6 +1,6 @@ ### # # -# Copyright (C) 2010-2013 Edward d'Auvergne # +# Copyright (C) 2010-2014 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -242,21 +242,6 @@ print(debug %s: Deleting the analysis GUI object. % full_name) self._analyses.pop(index) -# The current page has been deleted, so switch one back (if possible). -if index == self._current and self._current != 0: -if status.debug: -print(debug %s: Switching to page %s. % (full_name, self._current-1)) -self.switch_page(self._current-1) - -# No more analyses, so in the initial state. -if self._num_analyses == 0: -if status.debug: -print(debug %s: Setting the initial state. % full_name) -self.set_init_state() - -# Notify the observers of the change. -status.observers.gui_analysis.notify() - # Store the pipe bundle. pipe_bundle = ds.relax_gui.analyses[index].pipe_bundle @@ -271,6 +256,29 @@ if status.debug: print(debug %s: Deleting the data pipe '%s' from the '%s' bundle. % (full_name, pipe, pipe_bundle)) pipes.delete(pipe) + +# No more analyses, so in the initial state. +if self._num_analyses == 0: +if status.debug: +print(debug %s: Setting the initial state. % full_name) +self.set_init_state() + +# The current page has been deleted, so handle page switching to another page. +elif index == self._current: +# Default to the current page index - so that the switch is to the next page. +page_index = self._current + +# Switch back one page. +if self._num_analyses = self._current: +page_index = self._current - 1 + +# Make the switch. +if status.debug: +print(debug %s: Switching to page %s. % (full_name, page_index)) +self.switch_page(page_index) + +# Notify the observers of the change. +status.observers.gui_analysis.notify() def get_page_from_name(self, name): @@ -740,6 +748,10 @@ # Set the current page number. self._current = index +# Switch to the major data pipe of the page if not the current one. +if pipes.cdp_name() != ds.relax_gui.analyses[self._current].pipe_name: +self.gui.interpreter.apply('pipe.switch', ds.relax_gui.analyses[self._current].pipe_name) + # Switch to the page. wx.CallAfter(self.notebook.SetSelection, self._current) ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22265 - in /branches/double_rotor: ./ gui/analyses/__init__.py
Author: bugman Date: Mon Feb 24 10:42:33 2014 New Revision: 22265 URL: http://svn.gna.org/viewcvs/relax?rev=22265view=rev Log: Merged revisions 22264 via svnmerge from svn+ssh://bug...@svn.gna.org/svn/relax/trunk r22264 | bugman | 2014-02-24 10:41:44 +0100 (Mon, 24 Feb 2014) | 6 lines Fix for bug #21720 (https://gna.org/bugs/?21720). This is the faulty pipe switching behaviour when a non-last analysis tab is deleted in the GUI. Now the correct data pipe should be always switched to when closing an analysis tab. Modified: branches/double_rotor/ (props changed) branches/double_rotor/gui/analyses/__init__.py Propchange: branches/double_rotor/ -- --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Feb 24 10:42:33 2014 @@ -1,1 +1,1 @@ -/trunk:1-22262 +/trunk:1-22264 Modified: branches/double_rotor/gui/analyses/__init__.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/gui/analyses/__init__.py?rev=22265r1=22264r2=22265view=diff == --- branches/double_rotor/gui/analyses/__init__.py (original) +++ branches/double_rotor/gui/analyses/__init__.py Mon Feb 24 10:42:33 2014 @@ -1,6 +1,6 @@ ### # # -# Copyright (C) 2010-2013 Edward d'Auvergne # +# Copyright (C) 2010-2014 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -242,21 +242,6 @@ print(debug %s: Deleting the analysis GUI object. % full_name) self._analyses.pop(index) -# The current page has been deleted, so switch one back (if possible). -if index == self._current and self._current != 0: -if status.debug: -print(debug %s: Switching to page %s. % (full_name, self._current-1)) -self.switch_page(self._current-1) - -# No more analyses, so in the initial state. -if self._num_analyses == 0: -if status.debug: -print(debug %s: Setting the initial state. % full_name) -self.set_init_state() - -# Notify the observers of the change. -status.observers.gui_analysis.notify() - # Store the pipe bundle. pipe_bundle = ds.relax_gui.analyses[index].pipe_bundle @@ -271,6 +256,29 @@ if status.debug: print(debug %s: Deleting the data pipe '%s' from the '%s' bundle. % (full_name, pipe, pipe_bundle)) pipes.delete(pipe) + +# No more analyses, so in the initial state. +if self._num_analyses == 0: +if status.debug: +print(debug %s: Setting the initial state. % full_name) +self.set_init_state() + +# The current page has been deleted, so handle page switching to another page. +elif index == self._current: +# Default to the current page index - so that the switch is to the next page. +page_index = self._current + +# Switch back one page. +if self._num_analyses = self._current: +page_index = self._current - 1 + +# Make the switch. +if status.debug: +print(debug %s: Switching to page %s. % (full_name, page_index)) +self.switch_page(page_index) + +# Notify the observers of the change. +status.observers.gui_analysis.notify() def get_page_from_name(self, name): @@ -740,6 +748,10 @@ # Set the current page number. self._current = index +# Switch to the major data pipe of the page if not the current one. +if pipes.cdp_name() != ds.relax_gui.analyses[self._current].pipe_name: +self.gui.interpreter.apply('pipe.switch', ds.relax_gui.analyses[self._current].pipe_name) + # Switch to the page. wx.CallAfter(self.notebook.SetSelection, self._current) ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22266 - /trunk/auto_analyses/relax_disp.py
Author: bugman Date: Mon Feb 24 10:46:02 2014 New Revision: 22266 URL: http://svn.gna.org/viewcvs/relax?rev=22266view=rev Log: Fix for the model nesting part of the relaxation dispersion auto-analysis. This was recently broken at r22250. The nested pipe name needs to be passed through the name_pipe() method to obtain the correct pipe name. Modified: trunk/auto_analyses/relax_disp.py Modified: trunk/auto_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_disp.py?rev=22266r1=22265r2=22266view=diff == --- trunk/auto_analyses/relax_disp.py (original) +++ trunk/auto_analyses/relax_disp.py Mon Feb 24 10:46:02 2014 @@ -248,41 +248,41 @@ # The simpler model. nested_pipe = None if model == MODEL_LM63_3SITE and MODEL_LM63 in self.models: -nested_pipe = MODEL_LM63 +nested_pipe = self.name_pipe(MODEL_LM63) if model == MODEL_CR72_FULL and MODEL_CR72 in self.models: -nested_pipe = MODEL_CR72 +nested_pipe = self.name_pipe(MODEL_CR72) if model == MODEL_MMQ_CR72 and MODEL_CR72 in self.models: -nested_pipe = MODEL_CR72 +nested_pipe = self.name_pipe(MODEL_CR72) if model == MODEL_NS_CPMG_2SITE_3D_FULL and MODEL_NS_CPMG_2SITE_3D in self.models: -nested_pipe = MODEL_NS_CPMG_2SITE_3D +nested_pipe = self.name_pipe(MODEL_NS_CPMG_2SITE_3D) if model == MODEL_NS_CPMG_2SITE_STAR_FULL and MODEL_NS_CPMG_2SITE_STAR in self.models: -nested_pipe = MODEL_NS_CPMG_2SITE_STAR +nested_pipe = self.name_pipe(MODEL_NS_CPMG_2SITE_STAR) if model == MODEL_NS_MMQ_3SITE_LINEAR and MODEL_NS_MMQ_2SITE in self.models: -nested_pipe = MODEL_NS_MMQ_2SITE +nested_pipe = self.name_pipe(MODEL_NS_MMQ_2SITE) if model == MODEL_NS_MMQ_3SITE: if MODEL_NS_MMQ_3SITE_LINEAR in self.models: -nested_pipe = MODEL_NS_MMQ_3SITE_LINEAR +nested_pipe = self.name_pipe(MODEL_NS_MMQ_3SITE_LINEAR) elif MODEL_NS_MMQ_2SITE in self.models: -nested_pipe = MODEL_NS_MMQ_2SITE +nested_pipe = self.name_pipe(MODEL_NS_MMQ_2SITE) if model == MODEL_NS_R1RHO_3SITE_LINEAR and MODEL_NS_R1RHO_2SITE in self.models: -nested_pipe = MODEL_NS_R1RHO_2SITE +nested_pipe = self.name_pipe(MODEL_NS_R1RHO_2SITE) if model == MODEL_NS_R1RHO_3SITE: if MODEL_NS_R1RHO_3SITE_LINEAR in self.models: -nested_pipe = MODEL_NS_R1RHO_3SITE_LINEAR +nested_pipe = self.name_pipe(MODEL_NS_R1RHO_3SITE_LINEAR) elif MODEL_NS_R1RHO_2SITE in self.models: -nested_pipe = MODEL_NS_R1RHO_2SITE +nested_pipe = self.name_pipe(MODEL_NS_R1RHO_2SITE) # Using the analytic solution. analytic = False if model in [MODEL_NS_CPMG_2SITE_3D, MODEL_NS_CPMG_2SITE_EXPANDED, MODEL_NS_CPMG_2SITE_STAR] and MODEL_CR72 in self.models: -nested_pipe = MODEL_CR72 +nested_pipe = self.name_pipe(MODEL_CR72) analytic = True elif model == MODEL_NS_MMQ_2SITE and MODEL_MMQ_CR72 in self.models: -nested_pipe = MODEL_MMQ_CR72 +nested_pipe = self.name_pipe(MODEL_MMQ_CR72) analytic = True if model == MODEL_NS_R1RHO_2SITE and MODEL_MP05 in self.models: -nested_pipe = MODEL_MP05 +nested_pipe = self.name_pipe(MODEL_MP05) analytic = True # No nesting. ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22267 - in /branches/double_rotor: ./ auto_analyses/relax_disp.py
Author: bugman Date: Mon Feb 24 10:46:21 2014 New Revision: 22267 URL: http://svn.gna.org/viewcvs/relax?rev=22267view=rev Log: Merged revisions 22266 via svnmerge from svn+ssh://bug...@svn.gna.org/svn/relax/trunk r22266 | bugman | 2014-02-24 10:46:02 +0100 (Mon, 24 Feb 2014) | 6 lines Fix for the model nesting part of the relaxation dispersion auto-analysis. This was recently broken at r22250. The nested pipe name needs to be passed through the name_pipe() method to obtain the correct pipe name. Modified: branches/double_rotor/ (props changed) branches/double_rotor/auto_analyses/relax_disp.py Propchange: branches/double_rotor/ -- --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Feb 24 10:46:21 2014 @@ -1,1 +1,1 @@ -/trunk:1-22264 +/trunk:1-22266 Modified: branches/double_rotor/auto_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/auto_analyses/relax_disp.py?rev=22267r1=22266r2=22267view=diff == --- branches/double_rotor/auto_analyses/relax_disp.py (original) +++ branches/double_rotor/auto_analyses/relax_disp.py Mon Feb 24 10:46:21 2014 @@ -248,41 +248,41 @@ # The simpler model. nested_pipe = None if model == MODEL_LM63_3SITE and MODEL_LM63 in self.models: -nested_pipe = MODEL_LM63 +nested_pipe = self.name_pipe(MODEL_LM63) if model == MODEL_CR72_FULL and MODEL_CR72 in self.models: -nested_pipe = MODEL_CR72 +nested_pipe = self.name_pipe(MODEL_CR72) if model == MODEL_MMQ_CR72 and MODEL_CR72 in self.models: -nested_pipe = MODEL_CR72 +nested_pipe = self.name_pipe(MODEL_CR72) if model == MODEL_NS_CPMG_2SITE_3D_FULL and MODEL_NS_CPMG_2SITE_3D in self.models: -nested_pipe = MODEL_NS_CPMG_2SITE_3D +nested_pipe = self.name_pipe(MODEL_NS_CPMG_2SITE_3D) if model == MODEL_NS_CPMG_2SITE_STAR_FULL and MODEL_NS_CPMG_2SITE_STAR in self.models: -nested_pipe = MODEL_NS_CPMG_2SITE_STAR +nested_pipe = self.name_pipe(MODEL_NS_CPMG_2SITE_STAR) if model == MODEL_NS_MMQ_3SITE_LINEAR and MODEL_NS_MMQ_2SITE in self.models: -nested_pipe = MODEL_NS_MMQ_2SITE +nested_pipe = self.name_pipe(MODEL_NS_MMQ_2SITE) if model == MODEL_NS_MMQ_3SITE: if MODEL_NS_MMQ_3SITE_LINEAR in self.models: -nested_pipe = MODEL_NS_MMQ_3SITE_LINEAR +nested_pipe = self.name_pipe(MODEL_NS_MMQ_3SITE_LINEAR) elif MODEL_NS_MMQ_2SITE in self.models: -nested_pipe = MODEL_NS_MMQ_2SITE +nested_pipe = self.name_pipe(MODEL_NS_MMQ_2SITE) if model == MODEL_NS_R1RHO_3SITE_LINEAR and MODEL_NS_R1RHO_2SITE in self.models: -nested_pipe = MODEL_NS_R1RHO_2SITE +nested_pipe = self.name_pipe(MODEL_NS_R1RHO_2SITE) if model == MODEL_NS_R1RHO_3SITE: if MODEL_NS_R1RHO_3SITE_LINEAR in self.models: -nested_pipe = MODEL_NS_R1RHO_3SITE_LINEAR +nested_pipe = self.name_pipe(MODEL_NS_R1RHO_3SITE_LINEAR) elif MODEL_NS_R1RHO_2SITE in self.models: -nested_pipe = MODEL_NS_R1RHO_2SITE +nested_pipe = self.name_pipe(MODEL_NS_R1RHO_2SITE) # Using the analytic solution. analytic = False if model in [MODEL_NS_CPMG_2SITE_3D, MODEL_NS_CPMG_2SITE_EXPANDED, MODEL_NS_CPMG_2SITE_STAR] and MODEL_CR72 in self.models: -nested_pipe = MODEL_CR72 +nested_pipe = self.name_pipe(MODEL_CR72) analytic = True elif model == MODEL_NS_MMQ_2SITE and MODEL_MMQ_CR72 in self.models: -nested_pipe = MODEL_MMQ_CR72 +nested_pipe = self.name_pipe(MODEL_MMQ_CR72) analytic = True if model == MODEL_NS_R1RHO_2SITE and MODEL_MP05 in self.models: -nested_pipe = MODEL_MP05 +nested_pipe = self.name_pipe(MODEL_MP05) analytic = True # No nesting. ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22268 - /trunk/test_suite/gui_tests/relax_disp.py
Author: bugman Date: Mon Feb 24 10:51:42 2014 New Revision: 22268 URL: http://svn.gna.org/viewcvs/relax?rev=22268view=rev Log: Fix for the Relax_disp.test_tp02_data_to_tp02 GUI test. This was recently broken (at r22250). The name of the data pipe to switch to now contains the pipe bundle name. Modified: trunk/test_suite/gui_tests/relax_disp.py Modified: trunk/test_suite/gui_tests/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/relax_disp.py?rev=22268r1=22267r2=22268view=diff == --- trunk/test_suite/gui_tests/relax_disp.py (original) +++ trunk/test_suite/gui_tests/relax_disp.py Mon Feb 24 10:51:42 2014 @@ -1,6 +1,6 @@ ### # # -# Copyright (C) 2013 Edward d'Auvergne# +# Copyright (C) 2013-2014 Edward d'Auvergne # # Copyright (C) 2013 Troels E. Linnet # # # # This file is part of the program relax (http://www.nmr-relax.com). # @@ -681,7 +681,7 @@ r20_key2 = generate_r20_key(exp_type=EXP_TYPE_R1RHO, frq=800e6) # Switch to the 'TP02' model data pipe, then check for each spin. -switch('TP02') +switch(%s - %s % ('TP02', pipe_bundle)) spin_index = 0 for spin, spin_id in spin_loop(return_id=True): # Printout. ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22269 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
Author: tlinnet Date: Mon Feb 24 10:59:16 2014 New Revision: 22269 URL: http://svn.gna.org/viewcvs/relax?rev=22269view=rev Log: Merge branch 'bug' Modified: trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Modified: trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22269r1=22268r2=22269view=diff == --- trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py (original) +++ trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Mon Feb 24 10:59:16 2014 @@ -25,7 +25,7 @@ # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() from pipe_control import state -from specific_analyses.relax_disp.disp_data import loop_exp_frq, loop_exp_frq_offset_point_time +from specific_analyses.relax_disp.disp_data import loop_exp_frq, loop_exp_frq_offset, loop_exp_frq_offset_point, loop_exp_frq_offset_point_time from status import Status; status = Status() from test_suite.unit_tests.base_classes import UnitTestCase @@ -84,6 +84,115 @@ # Increment the data index. index += 1 + + +def test_loop_exp_frq_offset(self): +Unit test of the loop_exp_frq_offset() function. + +This uses the data of the saved state attached to U{bug #21665https://gna.org/bugs/?21665}. + + +# Load the state. +statefile = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21665.bz2' +state.load_state(statefile, force=True) + +# Original data (exp_type, frq, offset). +data = [ +['SQ CPMG', 499862140.0, 0], +['SQ CPMG', 599890858.6993, 0] +] + +# Original indices (ei, mi, oi). +indices = [ +[0, 0, 0], +[0, 1, 0] +] + +# Check the number of iterations. +print(Checking the number of iterations of the loop.) +count = 0 +for exp_type, frq, offset, ei, mi, oi in loop_exp_frq_offset(return_indices=True): +print exp_type, frq, offset, ei, mi, oi +count += 1 +self.assertEqual(count, 2) + +# Check the values. +print(Checking the values returned by the loop.) +index = 0 +for exp_type, frq, offset, ei, mi, oi in loop_exp_frq_offset(return_indices=True): +# Check the experiment info. +self.assertEqual(exp_type, data[index][0]) +self.assertEqual(ei, indices[index][0]) + +# Check the frequency info. +self.assertEqual(frq, data[index][1]) +self.assertEqual(mi, indices[index][1]) + +# Check the offset info. +self.assertEqual(offset, data[index][2]) +self.assertEqual(oi, indices[index][2]) + +# Increment the data index. +index += 1 + + +def test_loop_exp_frq_offset_point(self): +Unit test of the loop_exp_frq_offset_point() function. + +This uses the data of the saved state attached to U{bug #21665https://gna.org/bugs/?21665}. + + +# Load the state. +statefile = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21665.bz2' +state.load_state(statefile, force=True) + +# Original data (exp_type, frq, offset, point). +data = [ +['SQ CPMG', 499862140.0, 0, [50.0, 100.0, 150.0, 200.0, 250.0, 300.0, 350.0, 400.0, 450.0, 500.0, 550.0, 600.0, 650.0, 700.0, 800.0, 900.0, 1000.0]], +['SQ CPMG', 599890858.6993, 0, [33., 66.666, 100.0, 133.333, 166.666, 200.0, 233.333, 266.666, 300.0, 333.333, 366.666, 400.0, 466.666, 533.333, 666.666, 866.666, 1000.0]] +] + +# Original indices (ei, mi, oi). +indices = [ +[0, 0, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]], +[0, 1, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]] +] + +# Check the number of iterations. +print(Checking the number of iterations of the loop.) +count = 0 +for exp_type, frq, offset, point, ei, mi, oi, di in loop_exp_frq_offset_point(return_indices=True): +print exp_type, frq, offset, point, ei, mi, oi, di +count += 1 +self.assertEqual(count, 34) + +# Check the values. +print(Checking the values returned by the loop.) +frq_index = 0 +disp_index = 0 +for exp_type, frq, offset, point, ei, mi, oi, di in loop_exp_frq_offset_point(return_indices=True): +# Check the experiment info. +self.assertEqual(exp_type, data[frq_index][0]) +self.assertEqual(ei, indices[frq_index][0]) + +# Check
r22270 - in /branches/double_rotor: ./ test_suite/gui_tests/ test_suite/unit_tests/_specific_analyses/_relax_disp/
Author: bugman Date: Mon Feb 24 11:17:07 2014 New Revision: 22270 URL: http://svn.gna.org/viewcvs/relax?rev=22270view=rev Log: Merged revisions 22268-22269 via svnmerge from svn+ssh://bug...@svn.gna.org/svn/relax/trunk r22268 | bugman | 2014-02-24 10:51:42 +0100 (Mon, 24 Feb 2014) | 6 lines Fix for the Relax_disp.test_tp02_data_to_tp02 GUI test. This was recently broken (at r22250). The name of the data pipe to switch to now contains the pipe bundle name. r22269 | tlinnet | 2014-02-24 10:59:16 +0100 (Mon, 24 Feb 2014) | 1 line Merge branch 'bug' Modified: branches/double_rotor/ (props changed) branches/double_rotor/test_suite/gui_tests/relax_disp.py branches/double_rotor/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Propchange: branches/double_rotor/ -- --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Feb 24 11:17:07 2014 @@ -1,1 +1,1 @@ -/trunk:1-22266 +/trunk:1-22269 Modified: branches/double_rotor/test_suite/gui_tests/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/test_suite/gui_tests/relax_disp.py?rev=22270r1=22269r2=22270view=diff == --- branches/double_rotor/test_suite/gui_tests/relax_disp.py (original) +++ branches/double_rotor/test_suite/gui_tests/relax_disp.py Mon Feb 24 11:17:07 2014 @@ -1,6 +1,6 @@ ### # # -# Copyright (C) 2013 Edward d'Auvergne# +# Copyright (C) 2013-2014 Edward d'Auvergne # # Copyright (C) 2013 Troels E. Linnet # # # # This file is part of the program relax (http://www.nmr-relax.com). # @@ -681,7 +681,7 @@ r20_key2 = generate_r20_key(exp_type=EXP_TYPE_R1RHO, frq=800e6) # Switch to the 'TP02' model data pipe, then check for each spin. -switch('TP02') +switch(%s - %s % ('TP02', pipe_bundle)) spin_index = 0 for spin, spin_id in spin_loop(return_id=True): # Printout. Modified: branches/double_rotor/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22270r1=22269r2=22270view=diff == --- branches/double_rotor/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py (original) +++ branches/double_rotor/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Mon Feb 24 11:17:07 2014 @@ -25,7 +25,7 @@ # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() from pipe_control import state -from specific_analyses.relax_disp.disp_data import loop_exp_frq, loop_exp_frq_offset_point_time +from specific_analyses.relax_disp.disp_data import loop_exp_frq, loop_exp_frq_offset, loop_exp_frq_offset_point, loop_exp_frq_offset_point_time from status import Status; status = Status() from test_suite.unit_tests.base_classes import UnitTestCase @@ -84,6 +84,115 @@ # Increment the data index. index += 1 + + +def test_loop_exp_frq_offset(self): +Unit test of the loop_exp_frq_offset() function. + +This uses the data of the saved state attached to U{bug #21665https://gna.org/bugs/?21665}. + + +# Load the state. +statefile = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21665.bz2' +state.load_state(statefile, force=True) + +# Original data (exp_type, frq, offset). +data = [ +['SQ CPMG', 499862140.0, 0], +['SQ CPMG', 599890858.6993, 0] +] + +# Original indices (ei, mi, oi). +indices = [ +[0, 0, 0], +[0, 1, 0] +] + +# Check the number of iterations. +print(Checking the number of iterations of the loop.) +count = 0 +for exp_type, frq, offset, ei, mi, oi in loop_exp_frq_offset(return_indices=True): +print exp_type, frq, offset, ei, mi, oi +count += 1 +self.assertEqual(count, 2) + +# Check the values. +print(Checking the values returned by the loop.) +index = 0 +for exp_type, frq, offset, ei, mi, oi in loop_exp_frq_offset(return_indices=True): +# Check the experiment info. +self.assertEqual(exp_type, data[index][0]) +self.assertEqual(ei, indices[index][0]) + +
r22271 - /trunk/auto_analyses/relax_disp.py
Author: bugman Date: Mon Feb 24 11:57:20 2014 New Revision: 22271 URL: http://svn.gna.org/viewcvs/relax?rev=22271view=rev Log: Changes for the relaxation dispersion auto-analysis. The final data pipe name now includes the data pipe bundle name. This is so the pipe name is unique, allowing multiple analyses to be executed in one relax state. Modified: trunk/auto_analyses/relax_disp.py Modified: trunk/auto_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_disp.py?rev=22271r1=22270r2=22271view=diff == --- trunk/auto_analyses/relax_disp.py (original) +++ trunk/auto_analyses/relax_disp.py Mon Feb 24 11:57:20 2014 @@ -476,7 +476,7 @@ section(file=sys.stdout, text=Final results, prespace=2) # Perform model selection. -self.interpreter.model_selection(method=self.modsel, modsel_pipe='final', bundle=self.pipe_bundle, pipes=self.model_pipes) +self.interpreter.model_selection(method=self.modsel, modsel_pipe=self.name_pipe('final'), bundle=self.pipe_bundle, pipes=self.model_pipes) # Final Monte Carlo simulations only. if not self.mc_sim_all_models: ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22272 - in /trunk: data_store/mol_res_spin.py test_suite/system_tests/relax_disp.py
Author: bugman Date: Mon Feb 24 12:02:52 2014 New Revision: 22272 URL: http://svn.gna.org/viewcvs/relax?rev=22272view=rev Log: Removed a debugging printout. Modified: trunk/data_store/mol_res_spin.py trunk/test_suite/system_tests/relax_disp.py Modified: trunk/data_store/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/trunk/data_store/mol_res_spin.py?rev=22272r1=22271r2=22272view=diff == --- trunk/data_store/mol_res_spin.py (original) +++ trunk/data_store/mol_res_spin.py Mon Feb 24 12:02:52 2014 @@ -317,7 +317,6 @@ # Get the specific functions. -print `pipe_type` data_names = specific_analyses.setup.get_specific_fn('data_names', pipe_type, raise_error=False) return_data_desc = specific_analyses.setup.get_specific_fn('return_data_desc', pipe_type, raise_error=False) Modified: trunk/test_suite/system_tests/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=22272r1=22271r2=22272view=diff == --- trunk/test_suite/system_tests/relax_disp.py (original) +++ trunk/test_suite/system_tests/relax_disp.py Mon Feb 24 12:02:52 2014 @@ -90,20 +90,21 @@ self.interpreter.spin.isotope('15N') # Create the R2eff data pipe and load the results. -self.interpreter.pipe.create(pipe_name='R2eff', pipe_type='relax_disp') -self.interpreter.pipe.switch(pipe_name='R2eff') +self.interpreter.pipe.create(pipe_name='R2eff - relax_disp', pipe_type='relax_disp') +self.interpreter.pipe.switch(pipe_name='R2eff - relax_disp') self.interpreter.results.read(data_path+sep+'r2eff_pipe') self.interpreter.deselect.spin(':4') # The model data pipe. -self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=model, bundle_to='relax_disp') -self.interpreter.pipe.switch(pipe_name=model) +pipe_name = %s - relax_disp % model +self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=pipe_name, bundle_to='relax_disp') +self.interpreter.pipe.switch(pipe_name=pipe_name) # Set the model. self.interpreter.relax_disp.select_model(model=model) # Copy the data. -self.interpreter.value.copy(pipe_from='R2eff', pipe_to=model, param='r2eff') +self.interpreter.value.copy(pipe_from='R2eff - relax_disp', pipe_to=pipe_name, param='r2eff') def setup_kteilum_fmpoulsen_makke_cpmg_data(self, model=None, expfolder=None): @@ -124,14 +125,15 @@ self.interpreter.results.read(data_path+sep+'r2eff_pipe_trunc') # The model data pipe. -self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=model, bundle_to='relax_disp') -self.interpreter.pipe.switch(pipe_name=model) +pipe_name = %s - relax_disp % model +self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=pipe_name, bundle_to='relax_disp') +self.interpreter.pipe.switch(pipe_name=pipe_name) # Set the model. self.interpreter.relax_disp.select_model(model=model) # Copy the data. -self.interpreter.value.copy(pipe_from='R2eff', pipe_to=model, param='r2eff') +self.interpreter.value.copy(pipe_from='R2eff', pipe_to=pipe_name, param='r2eff') def setup_korzhnev_2005_data(self, data_list=[]): @@ -360,7 +362,7 @@ phi_ex.append(pA * (1.0 - pA) * delta_omega[i]**2) # Switch to the 'DPL94' model data pipe, then check for each spin. -self.interpreter.pipe.switch('DPL94') +self.interpreter.pipe.switch('DPL94 - relax_disp') spin_index = 0 for spin, spin_id in spin_loop(return_id=True): # Printout. @@ -558,7 +560,7 @@ r20_key2 = generate_r20_key(exp_type=EXP_TYPE_CPMG_SQ, frq=800e6) # The 'No Rex' model checks. -self.interpreter.pipe.switch(pipe_name='No Rex') +self.interpreter.pipe.switch(pipe_name='No Rex - relax_disp') spin70 = return_spin(:70) spin71 = return_spin(:71) print(\n\nOptimised parameters:\n) @@ -574,7 +576,7 @@ self.assertAlmostEqual(spin71.chi2, 3908.00127830003, 3) # The 'LM63' model checks. -self.interpreter.pipe.switch(pipe_name='LM63') +self.interpreter.pipe.switch(pipe_name='LM63 - relax_disp') spin70 = return_spin(:70) spin71 = return_spin(:71) print(\n\nOptimised parameters:\n) @@ -596,7 +598,7 @@ self.assertAlmostEqual(spin71.chi2, 17.0776426190574, 3) # The 'CR72' model checks. -self.interpreter.pipe.switch(pipe_name='CR72') +self.interpreter.pipe.switch(pipe_name='CR72 - relax_disp') spin70 = return_spin(:70) spin71 = return_spin(:71) print(\n\nOptimised parameters:\n) @@ -643,7 +645,7 @@
r22273 - in /trunk: data_store/mol_res_spin.py test_suite/system_tests/relax_disp.py
Author: bugman Date: Mon Feb 24 12:15:03 2014 New Revision: 22273 URL: http://svn.gna.org/viewcvs/relax?rev=22273view=rev Log: Reverted commit r22272 as too much was committed. The command used was: svn merge -r22272:22271 . Modified: trunk/data_store/mol_res_spin.py trunk/test_suite/system_tests/relax_disp.py Modified: trunk/data_store/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/trunk/data_store/mol_res_spin.py?rev=22273r1=22272r2=22273view=diff == --- trunk/data_store/mol_res_spin.py (original) +++ trunk/data_store/mol_res_spin.py Mon Feb 24 12:15:03 2014 @@ -317,6 +317,7 @@ # Get the specific functions. +print `pipe_type` data_names = specific_analyses.setup.get_specific_fn('data_names', pipe_type, raise_error=False) return_data_desc = specific_analyses.setup.get_specific_fn('return_data_desc', pipe_type, raise_error=False) Modified: trunk/test_suite/system_tests/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=22273r1=22272r2=22273view=diff == --- trunk/test_suite/system_tests/relax_disp.py (original) +++ trunk/test_suite/system_tests/relax_disp.py Mon Feb 24 12:15:03 2014 @@ -90,21 +90,20 @@ self.interpreter.spin.isotope('15N') # Create the R2eff data pipe and load the results. -self.interpreter.pipe.create(pipe_name='R2eff - relax_disp', pipe_type='relax_disp') -self.interpreter.pipe.switch(pipe_name='R2eff - relax_disp') +self.interpreter.pipe.create(pipe_name='R2eff', pipe_type='relax_disp') +self.interpreter.pipe.switch(pipe_name='R2eff') self.interpreter.results.read(data_path+sep+'r2eff_pipe') self.interpreter.deselect.spin(':4') # The model data pipe. -pipe_name = %s - relax_disp % model -self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=pipe_name, bundle_to='relax_disp') -self.interpreter.pipe.switch(pipe_name=pipe_name) +self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=model, bundle_to='relax_disp') +self.interpreter.pipe.switch(pipe_name=model) # Set the model. self.interpreter.relax_disp.select_model(model=model) # Copy the data. -self.interpreter.value.copy(pipe_from='R2eff - relax_disp', pipe_to=pipe_name, param='r2eff') +self.interpreter.value.copy(pipe_from='R2eff', pipe_to=model, param='r2eff') def setup_kteilum_fmpoulsen_makke_cpmg_data(self, model=None, expfolder=None): @@ -125,15 +124,14 @@ self.interpreter.results.read(data_path+sep+'r2eff_pipe_trunc') # The model data pipe. -pipe_name = %s - relax_disp % model -self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=pipe_name, bundle_to='relax_disp') -self.interpreter.pipe.switch(pipe_name=pipe_name) +self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=model, bundle_to='relax_disp') +self.interpreter.pipe.switch(pipe_name=model) # Set the model. self.interpreter.relax_disp.select_model(model=model) # Copy the data. -self.interpreter.value.copy(pipe_from='R2eff', pipe_to=pipe_name, param='r2eff') +self.interpreter.value.copy(pipe_from='R2eff', pipe_to=model, param='r2eff') def setup_korzhnev_2005_data(self, data_list=[]): @@ -362,7 +360,7 @@ phi_ex.append(pA * (1.0 - pA) * delta_omega[i]**2) # Switch to the 'DPL94' model data pipe, then check for each spin. -self.interpreter.pipe.switch('DPL94 - relax_disp') +self.interpreter.pipe.switch('DPL94') spin_index = 0 for spin, spin_id in spin_loop(return_id=True): # Printout. @@ -560,7 +558,7 @@ r20_key2 = generate_r20_key(exp_type=EXP_TYPE_CPMG_SQ, frq=800e6) # The 'No Rex' model checks. -self.interpreter.pipe.switch(pipe_name='No Rex - relax_disp') +self.interpreter.pipe.switch(pipe_name='No Rex') spin70 = return_spin(:70) spin71 = return_spin(:71) print(\n\nOptimised parameters:\n) @@ -576,7 +574,7 @@ self.assertAlmostEqual(spin71.chi2, 3908.00127830003, 3) # The 'LM63' model checks. -self.interpreter.pipe.switch(pipe_name='LM63 - relax_disp') +self.interpreter.pipe.switch(pipe_name='LM63') spin70 = return_spin(:70) spin71 = return_spin(:71) print(\n\nOptimised parameters:\n) @@ -598,7 +596,7 @@ self.assertAlmostEqual(spin71.chi2, 17.0776426190574, 3) # The 'CR72' model checks. -self.interpreter.pipe.switch(pipe_name='CR72 - relax_disp') +self.interpreter.pipe.switch(pipe_name='CR72') spin70 = return_spin(:70) spin71 = return_spin(:71)
r22274 - /trunk/data_store/mol_res_spin.py
Author: bugman Date: Mon Feb 24 12:15:47 2014 New Revision: 22274 URL: http://svn.gna.org/viewcvs/relax?rev=22274view=rev Log: Removed a debugging statement (should have happened at r22272). Modified: trunk/data_store/mol_res_spin.py Modified: trunk/data_store/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/trunk/data_store/mol_res_spin.py?rev=22274r1=22273r2=22274view=diff == --- trunk/data_store/mol_res_spin.py (original) +++ trunk/data_store/mol_res_spin.py Mon Feb 24 12:15:47 2014 @@ -317,7 +317,6 @@ # Get the specific functions. -print `pipe_type` data_names = specific_analyses.setup.get_specific_fn('data_names', pipe_type, raise_error=False) return_data_desc = specific_analyses.setup.get_specific_fn('return_data_desc', pipe_type, raise_error=False) ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22275 - /trunk/test_suite/system_tests/relax_disp.py
Author: bugman Date: Mon Feb 24 12:17:22 2014 New Revision: 22275 URL: http://svn.gna.org/viewcvs/relax?rev=22275view=rev Log: Fixes for all of the Relax_disp system tests for the changes to the dispersion auto-analysis. The automatically created pipe names now include the pipe bundle name to make them unique, so the system tests have been updated to match this behaviour. Modified: trunk/test_suite/system_tests/relax_disp.py Modified: trunk/test_suite/system_tests/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=22275r1=22274r2=22275view=diff == --- trunk/test_suite/system_tests/relax_disp.py (original) +++ trunk/test_suite/system_tests/relax_disp.py Mon Feb 24 12:17:22 2014 @@ -90,20 +90,21 @@ self.interpreter.spin.isotope('15N') # Create the R2eff data pipe and load the results. -self.interpreter.pipe.create(pipe_name='R2eff', pipe_type='relax_disp') -self.interpreter.pipe.switch(pipe_name='R2eff') +self.interpreter.pipe.create(pipe_name='R2eff - relax_disp', pipe_type='relax_disp') +self.interpreter.pipe.switch(pipe_name='R2eff - relax_disp') self.interpreter.results.read(data_path+sep+'r2eff_pipe') self.interpreter.deselect.spin(':4') # The model data pipe. -self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=model, bundle_to='relax_disp') -self.interpreter.pipe.switch(pipe_name=model) +pipe_name = %s - relax_disp % model +self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=pipe_name, bundle_to='relax_disp') +self.interpreter.pipe.switch(pipe_name=pipe_name) # Set the model. self.interpreter.relax_disp.select_model(model=model) # Copy the data. -self.interpreter.value.copy(pipe_from='R2eff', pipe_to=model, param='r2eff') +self.interpreter.value.copy(pipe_from='R2eff - relax_disp', pipe_to=pipe_name, param='r2eff') def setup_kteilum_fmpoulsen_makke_cpmg_data(self, model=None, expfolder=None): @@ -124,14 +125,15 @@ self.interpreter.results.read(data_path+sep+'r2eff_pipe_trunc') # The model data pipe. -self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=model, bundle_to='relax_disp') -self.interpreter.pipe.switch(pipe_name=model) +pipe_name = %s - relax_disp % model +self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=pipe_name, bundle_to='relax_disp') +self.interpreter.pipe.switch(pipe_name=pipe_name) # Set the model. self.interpreter.relax_disp.select_model(model=model) # Copy the data. -self.interpreter.value.copy(pipe_from='R2eff', pipe_to=model, param='r2eff') +self.interpreter.value.copy(pipe_from='R2eff', pipe_to=pipe_name, param='r2eff') def setup_korzhnev_2005_data(self, data_list=[]): @@ -360,7 +362,7 @@ phi_ex.append(pA * (1.0 - pA) * delta_omega[i]**2) # Switch to the 'DPL94' model data pipe, then check for each spin. -self.interpreter.pipe.switch('DPL94') +self.interpreter.pipe.switch('DPL94 - relax_disp') spin_index = 0 for spin, spin_id in spin_loop(return_id=True): # Printout. @@ -558,7 +560,7 @@ r20_key2 = generate_r20_key(exp_type=EXP_TYPE_CPMG_SQ, frq=800e6) # The 'No Rex' model checks. -self.interpreter.pipe.switch(pipe_name='No Rex') +self.interpreter.pipe.switch(pipe_name='No Rex - relax_disp') spin70 = return_spin(:70) spin71 = return_spin(:71) print(\n\nOptimised parameters:\n) @@ -574,7 +576,7 @@ self.assertAlmostEqual(spin71.chi2, 3908.00127830003, 3) # The 'LM63' model checks. -self.interpreter.pipe.switch(pipe_name='LM63') +self.interpreter.pipe.switch(pipe_name='LM63 - relax_disp') spin70 = return_spin(:70) spin71 = return_spin(:71) print(\n\nOptimised parameters:\n) @@ -596,7 +598,7 @@ self.assertAlmostEqual(spin71.chi2, 17.0776426190574, 3) # The 'CR72' model checks. -self.interpreter.pipe.switch(pipe_name='CR72') +self.interpreter.pipe.switch(pipe_name='CR72 - relax_disp') spin70 = return_spin(:70) spin71 = return_spin(:71) print(\n\nOptimised parameters:\n) @@ -643,7 +645,7 @@ r20_key2 = generate_r20_key(exp_type=EXP_TYPE_CPMG_SQ, frq=800e6) # The 'No Rex' model checks. -self.interpreter.pipe.switch(pipe_name='No Rex') +self.interpreter.pipe.switch(pipe_name='No Rex - relax_disp') spin70 = return_spin(:70) spin71 = return_spin(:71) print(\n\nOptimised parameters:\n) @@ -659,7 +661,7 @@ self.assertAlmostEqual(spin71.chi2/1, 3908.00127830003/1, 3) # The 'CR72' model
r22276 - /trunk/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py
Author: bugman Date: Mon Feb 24 12:27:27 2014 New Revision: 22276 URL: http://svn.gna.org/viewcvs/relax?rev=22276view=rev Log: Increased the grid search size in the r1rho_on_res_m61.py dispersion system test script. This is to allow the Relax_disp.test_m61_exp_data_to_m61 system test to pass more often. The increase does not cause a large increase in computation time as less time is spent in the optimisation and Monte Carlo simulation steps. Modified: trunk/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py Modified: trunk/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py?rev=22276r1=22275r2=22276view=diff == --- trunk/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py (original) +++ trunk/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py Mon Feb 24 12:27:27 2014 @@ -17,7 +17,7 @@ MODELS = ['R2eff', 'No Rex', 'M61'] # The grid search size (the number of increments per dimension). -GRID_INC = 5 +GRID_INC = 8 # The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. MC_NUM = 3 ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22277 - in /branches/double_rotor: ./ auto_analyses/ data_store/ test_suite/system_tests/
Author: bugman Date: Mon Feb 24 12:27:58 2014 New Revision: 22277 URL: http://svn.gna.org/viewcvs/relax?rev=22277view=rev Log: Merged revisions 22271-22272 via svnmerge from svn+ssh://bug...@svn.gna.org/svn/relax/trunk r22271 | bugman | 2014-02-24 11:57:20 +0100 (Mon, 24 Feb 2014) | 6 lines Changes for the relaxation dispersion auto-analysis. The final data pipe name now includes the data pipe bundle name. This is so the pipe name is unique, allowing multiple analyses to be executed in one relax state. r22272 | bugman | 2014-02-24 12:02:52 +0100 (Mon, 24 Feb 2014) | 3 lines Removed a debugging printout. Modified: branches/double_rotor/ (props changed) branches/double_rotor/auto_analyses/relax_disp.py branches/double_rotor/data_store/mol_res_spin.py branches/double_rotor/test_suite/system_tests/relax_disp.py Propchange: branches/double_rotor/ -- --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Feb 24 12:27:58 2014 @@ -1,1 +1,1 @@ -/trunk:1-22269 +/trunk:1-22272 Modified: branches/double_rotor/auto_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/auto_analyses/relax_disp.py?rev=22277r1=22276r2=22277view=diff == --- branches/double_rotor/auto_analyses/relax_disp.py (original) +++ branches/double_rotor/auto_analyses/relax_disp.py Mon Feb 24 12:27:58 2014 @@ -476,7 +476,7 @@ section(file=sys.stdout, text=Final results, prespace=2) # Perform model selection. -self.interpreter.model_selection(method=self.modsel, modsel_pipe='final', bundle=self.pipe_bundle, pipes=self.model_pipes) +self.interpreter.model_selection(method=self.modsel, modsel_pipe=self.name_pipe('final'), bundle=self.pipe_bundle, pipes=self.model_pipes) # Final Monte Carlo simulations only. if not self.mc_sim_all_models: Modified: branches/double_rotor/data_store/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/data_store/mol_res_spin.py?rev=22277r1=22276r2=22277view=diff == --- branches/double_rotor/data_store/mol_res_spin.py (original) +++ branches/double_rotor/data_store/mol_res_spin.py Mon Feb 24 12:27:58 2014 @@ -317,7 +317,6 @@ # Get the specific functions. -print `pipe_type` data_names = specific_analyses.setup.get_specific_fn('data_names', pipe_type, raise_error=False) return_data_desc = specific_analyses.setup.get_specific_fn('return_data_desc', pipe_type, raise_error=False) Modified: branches/double_rotor/test_suite/system_tests/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/test_suite/system_tests/relax_disp.py?rev=22277r1=22276r2=22277view=diff == --- branches/double_rotor/test_suite/system_tests/relax_disp.py (original) +++ branches/double_rotor/test_suite/system_tests/relax_disp.py Mon Feb 24 12:27:58 2014 @@ -90,20 +90,21 @@ self.interpreter.spin.isotope('15N') # Create the R2eff data pipe and load the results. -self.interpreter.pipe.create(pipe_name='R2eff', pipe_type='relax_disp') -self.interpreter.pipe.switch(pipe_name='R2eff') +self.interpreter.pipe.create(pipe_name='R2eff - relax_disp', pipe_type='relax_disp') +self.interpreter.pipe.switch(pipe_name='R2eff - relax_disp') self.interpreter.results.read(data_path+sep+'r2eff_pipe') self.interpreter.deselect.spin(':4') # The model data pipe. -self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=model, bundle_to='relax_disp') -self.interpreter.pipe.switch(pipe_name=model) +pipe_name = %s - relax_disp % model +self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=pipe_name, bundle_to='relax_disp') +self.interpreter.pipe.switch(pipe_name=pipe_name) # Set the model. self.interpreter.relax_disp.select_model(model=model) # Copy the data. -self.interpreter.value.copy(pipe_from='R2eff', pipe_to=model, param='r2eff') +self.interpreter.value.copy(pipe_from='R2eff - relax_disp', pipe_to=pipe_name, param='r2eff') def setup_kteilum_fmpoulsen_makke_cpmg_data(self, model=None, expfolder=None): @@ -124,14 +125,15 @@ self.interpreter.results.read(data_path+sep+'r2eff_pipe_trunc') # The model data pipe. -self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=model, bundle_to='relax_disp') -self.interpreter.pipe.switch(pipe_name=model) +pipe_name = %s - relax_disp % model +self.interpreter.pipe.copy(pipe_from='base pipe', pipe_to=pipe_name,
r22278 - in /branches/double_rotor: ./ test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py
Author: bugman Date: Mon Feb 24 12:28:21 2014 New Revision: 22278 URL: http://svn.gna.org/viewcvs/relax?rev=22278view=rev Log: Merged revisions 22273-22276 via svnmerge from svn+ssh://bug...@svn.gna.org/svn/relax/trunk r22273 | bugman | 2014-02-24 12:15:03 +0100 (Mon, 24 Feb 2014) | 6 lines Reverted commit r22272 as too much was committed. The command used was: svn merge -r22272:22271 . r22274 | bugman | 2014-02-24 12:15:47 +0100 (Mon, 24 Feb 2014) | 3 lines Removed a debugging statement (should have happened at r22272). r22275 | bugman | 2014-02-24 12:17:22 +0100 (Mon, 24 Feb 2014) | 6 lines Fixes for all of the Relax_disp system tests for the changes to the dispersion auto-analysis. The automatically created pipe names now include the pipe bundle name to make them unique, so the system tests have been updated to match this behaviour. r22276 | bugman | 2014-02-24 12:27:27 +0100 (Mon, 24 Feb 2014) | 7 lines Increased the grid search size in the r1rho_on_res_m61.py dispersion system test script. This is to allow the Relax_disp.test_m61_exp_data_to_m61 system test to pass more often. The increase does not cause a large increase in computation time as less time is spent in the optimisation and Monte Carlo simulation steps. Modified: branches/double_rotor/ (props changed) branches/double_rotor/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py Propchange: branches/double_rotor/ -- --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Feb 24 12:28:21 2014 @@ -1,1 +1,1 @@ -/trunk:1-22272 +/trunk:1-22277 Modified: branches/double_rotor/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py?rev=22278r1=22277r2=22278view=diff == --- branches/double_rotor/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py (original) +++ branches/double_rotor/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py Mon Feb 24 12:28:21 2014 @@ -17,7 +17,7 @@ MODELS = ['R2eff', 'No Rex', 'M61'] # The grid search size (the number of increments per dimension). -GRID_INC = 5 +GRID_INC = 8 # The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. MC_NUM = 3 ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22279 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
Author: tlinnet Date: Mon Feb 24 13:59:49 2014 New Revision: 22279 URL: http://svn.gna.org/viewcvs/relax?rev=22279view=rev Log: Renamed unit test, to follow previous namings of unit tests. Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis with two fields at two delay times. Modified: trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Modified: trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22279r1=22278r2=22279view=diff == --- trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py (original) +++ trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Mon Feb 24 13:59:49 2014 @@ -195,7 +195,7 @@ disp_index += 1 -def test_loop_exp_frq_offset_point_time(self): +def test_loop_exp_frq_offset_point_time_setup(self): U{Bug #21665https://gna.org/bugs/?21665} catch, the failure due to a a CPMG analysis recorded at two fields at two delay times, using calc(). # Load the state. ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22280 - /trunk/auto_analyses/relax_disp.py
Author: bugman Date: Mon Feb 24 14:14:02 2014 New Revision: 22280 URL: http://svn.gna.org/viewcvs/relax?rev=22280view=rev Log: Fix for the relaxation dispersion auto-analysis to improve its behaviour in the test suite. The problem is that the auto-analysis acquires the execution lock (status.exec_lock) but if the analysis cannot complete due to a bug, the lock is never released. This causes nasty problems for many subsequent tests, resulting in a cascade of test failures. This is especially problematic in the GUI tests where the execution lock controls many aspects of the interface. The solution was simply to run the auto-analysis run() method within a try-finally statement. The release of the lock occurs in the 'finally' clause, guaranteeing its release. Modified: trunk/auto_analyses/relax_disp.py Modified: trunk/auto_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_disp.py?rev=22280r1=22279r2=22280view=diff == --- trunk/auto_analyses/relax_disp.py (original) +++ trunk/auto_analyses/relax_disp.py Mon Feb 24 14:14:02 2014 @@ -113,12 +113,14 @@ self.interpreter.on(verbose=False) # Execute. -self.run() +try: +self.run() # Finish and unlock execution. -status.auto_analysis[self.pipe_bundle].fin = True -status.current_analysis = None -status.exec_lock.release() +finally: +status.auto_analysis[self.pipe_bundle].fin = True +status.current_analysis = None +status.exec_lock.release() def is_model_for_selection(self, model=None): ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22281 - /trunk/test_suite/gui_tests/base_classes.py
Author: bugman Date: Mon Feb 24 14:16:36 2014 New Revision: 22281 URL: http://svn.gna.org/viewcvs/relax?rev=22281view=rev Log: Improvement for GUI test base tearDown() clean up method. A wx.Yield() call has been added to allow all GUI operations after a relax reset to complete prior to the next test starting. This should avoid certain racing conditions which can cause a cascade of tests to fail. Modified: trunk/test_suite/gui_tests/base_classes.py Modified: trunk/test_suite/gui_tests/base_classes.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/base_classes.py?rev=22281r1=22280r2=22281view=diff == --- trunk/test_suite/gui_tests/base_classes.py (original) +++ trunk/test_suite/gui_tests/base_classes.py Mon Feb 24 14:16:36 2014 @@ -196,3 +196,6 @@ # Reset relax. reset() + +# Flush all wx events again to allow the reset event to propagate throughout the GUI and the execution lock to be released before the next test starts. +wx.Yield() ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22282 - in /branches/double_rotor: ./ auto_analyses/ test_suite/gui_tests/ test_suite/unit_tests/_specific_analyses/_relax_...
Author: bugman Date: Mon Feb 24 14:17:58 2014 New Revision: 22282 URL: http://svn.gna.org/viewcvs/relax?rev=22282view=rev Log: Merged revisions 22279-22281 via svnmerge from svn+ssh://bug...@svn.gna.org/svn/relax/trunk r22279 | tlinnet | 2014-02-24 13:59:49 +0100 (Mon, 24 Feb 2014) | 3 lines Renamed unit test, to follow previous namings of unit tests. Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis with two fields at two delay times. r22280 | bugman | 2014-02-24 14:14:02 +0100 (Mon, 24 Feb 2014) | 11 lines Fix for the relaxation dispersion auto-analysis to improve its behaviour in the test suite. The problem is that the auto-analysis acquires the execution lock (status.exec_lock) but if the analysis cannot complete due to a bug, the lock is never released. This causes nasty problems for many subsequent tests, resulting in a cascade of test failures. This is especially problematic in the GUI tests where the execution lock controls many aspects of the interface. The solution was simply to run the auto-analysis run() method within a try-finally statement. The release of the lock occurs in the 'finally' clause, guaranteeing its release. r22281 | bugman | 2014-02-24 14:16:36 +0100 (Mon, 24 Feb 2014) | 7 lines Improvement for GUI test base tearDown() clean up method. A wx.Yield() call has been added to allow all GUI operations after a relax reset to complete prior to the next test starting. This should avoid certain racing conditions which can cause a cascade of tests to fail. Modified: branches/double_rotor/ (props changed) branches/double_rotor/auto_analyses/relax_disp.py branches/double_rotor/test_suite/gui_tests/base_classes.py branches/double_rotor/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Propchange: branches/double_rotor/ -- --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Feb 24 14:17:58 2014 @@ -1,1 +1,1 @@ -/trunk:1-22277 +/trunk:1-22281 Modified: branches/double_rotor/auto_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/auto_analyses/relax_disp.py?rev=22282r1=22281r2=22282view=diff == --- branches/double_rotor/auto_analyses/relax_disp.py (original) +++ branches/double_rotor/auto_analyses/relax_disp.py Mon Feb 24 14:17:58 2014 @@ -113,12 +113,14 @@ self.interpreter.on(verbose=False) # Execute. -self.run() +try: +self.run() # Finish and unlock execution. -status.auto_analysis[self.pipe_bundle].fin = True -status.current_analysis = None -status.exec_lock.release() +finally: +status.auto_analysis[self.pipe_bundle].fin = True +status.current_analysis = None +status.exec_lock.release() def is_model_for_selection(self, model=None): Modified: branches/double_rotor/test_suite/gui_tests/base_classes.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/test_suite/gui_tests/base_classes.py?rev=22282r1=22281r2=22282view=diff == --- branches/double_rotor/test_suite/gui_tests/base_classes.py (original) +++ branches/double_rotor/test_suite/gui_tests/base_classes.py Mon Feb 24 14:17:58 2014 @@ -196,3 +196,6 @@ # Reset relax. reset() + +# Flush all wx events again to allow the reset event to propagate throughout the GUI and the execution lock to be released before the next test starts. +wx.Yield() Modified: branches/double_rotor/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22282r1=22281r2=22282view=diff == --- branches/double_rotor/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py (original) +++ branches/double_rotor/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Mon Feb 24 14:17:58 2014 @@ -195,7 +195,7 @@ disp_index += 1 -def test_loop_exp_frq_offset_point_time(self): +def test_loop_exp_frq_offset_point_time_setup(self): U{Bug #21665https://gna.org/bugs/?21665} catch, the failure due to a a CPMG analysis recorded at two fields at two delay times, using calc(). # Load the state. ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at
r22283 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
Author: tlinnet Date: Mon Feb 24 14:20:41 2014 New Revision: 22283 URL: http://svn.gna.org/viewcvs/relax?rev=22283view=rev Log: Added unit test for looping over: exp, frq, offset, point, time. Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis with two fields at two delay times. This unit test will fail, since the last loop over the time points has a weak assumption just to loop over all time points, instead of checking for existence of such time point. This unit test follows recommendation in thread: http://thread.gmane.org/gmane.science.nmr.relax.devel/5070. Modified: trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Modified: trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22283r1=22282r2=22283view=diff == --- trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py (original) +++ trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Mon Feb 24 14:20:41 2014 @@ -186,6 +186,69 @@ # Check the dispersion point info. self.assertAlmostEqual(point, data[frq_index][3][disp_index],2) self.assertEqual(di, indices[frq_index][3][disp_index]) + +# Increment the data index. +if disp_index == 16: +frq_index += 1 +disp_index = 0 +else: +disp_index += 1 + + +def test_loop_exp_frq_offset_point_time(self): +Unit test of the loop_exp_frq_offset_point_time() function. + +This uses the data of the saved state attached to U{bug #21665https://gna.org/bugs/?21665}. + + +# Load the state. +statefile = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21665.bz2' +state.load_state(statefile, force=True) + +# Original data (exp_type, frq, offset, point). +data = [ +['SQ CPMG', 499862140.0, 0, [50.0, 100.0, 150.0, 200.0, 250.0, 300.0, 350.0, 400.0, 450.0, 500.0, 550.0, 600.0, 650.0, 700.0, 800.0, 900.0, 1000.0],0.04], +['SQ CPMG', 599890858.6993, 0, [33., 66.666, 100.0, 133.333, 166.666, 200.0, 233.333, 266.666, 300.0, 333.333, 366.666, 400.0, 466.666, 533.333, 666.666, 866.666, 1000.0],0.06] +] + +# Original indices (ei, mi, oi). +indices = [ +[0, 0, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], 0], +[0, 1, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], 1] +] + +# Check the number of iterations. +print(Checking the number of iterations of the loop.) +count = 0 +for exp_type, frq, offset, point, time, ei, mi, oi, di, ti in loop_exp_frq_offset_point_time(return_indices=True): +print exp_type, frq, offset, point, time, ei, mi, oi, di, ti +count += 1 +self.assertEqual(count, 34) + +# Check the values. +print(Checking the values returned by the loop.) +frq_index = 0 +disp_index = 0 +for exp_type, frq, offset, point, time, ei, mi, oi, di, ti in loop_exp_frq_offset_point_time(return_indices=True): +# Check the experiment info. +self.assertEqual(exp_type, data[frq_index][0]) +self.assertEqual(ei, indices[frq_index][0]) + +# Check the frequency info. +self.assertEqual(frq, data[frq_index][1]) +self.assertEqual(mi, indices[frq_index][1]) + +# Check the offset info. +self.assertEqual(offset, data[frq_index][2]) +self.assertEqual(oi, indices[frq_index][2]) + +# Check the dispersion point info. +self.assertAlmostEqual(point, data[frq_index][3][disp_index],2) +self.assertEqual(di, indices[frq_index][3][disp_index]) + +# Check the time point info. +self.assertEqual(time, data[frq_index][4]) +self.assertEqual(ti, indices[frq_index][4]) # Increment the data index. if disp_index == 16: ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22285 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
Author: tlinnet Date: Mon Feb 24 14:20:45 2014 New Revision: 22285 URL: http://svn.gna.org/viewcvs/relax?rev=22285view=rev Log: Replaced print commands to be compatible with Python 3.x Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis with two fields at two delay times. Modified: trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Modified: trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22285r1=22284r2=22285view=diff == --- trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py (original) +++ trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Mon Feb 24 14:20:45 2014 @@ -66,7 +66,7 @@ print(Checking the number of iterations of the loop.) count = 0 for exp_type, frq, ei, mi in loop_exp_frq(return_indices=True): -print exp_type, frq, ei, mi +print(exp_type, frq, ei, mi) count += 1 self.assertEqual(count, 2) @@ -112,7 +112,7 @@ print(Checking the number of iterations of the loop.) count = 0 for exp_type, frq, offset, ei, mi, oi in loop_exp_frq_offset(return_indices=True): -print exp_type, frq, offset, ei, mi, oi +print(exp_type, frq, offset, ei, mi, oi) count += 1 self.assertEqual(count, 2) @@ -162,7 +162,7 @@ print(Checking the number of iterations of the loop.) count = 0 for exp_type, frq, offset, point, ei, mi, oi, di in loop_exp_frq_offset_point(return_indices=True): -print exp_type, frq, offset, point, ei, mi, oi, di +print(exp_type, frq, offset, point, ei, mi, oi, di) count += 1 self.assertEqual(count, 34) @@ -221,7 +221,7 @@ print(Checking the number of iterations of the loop.) count = 0 for exp_type, frq, offset, point, time, ei, mi, oi, di, ti in loop_exp_frq_offset_point_time(return_indices=True): -print exp_type, frq, offset, point, time, ei, mi, oi, di, ti +print(exp_type, frq, offset, point, time, ei, mi, oi, di, ti) count += 1 self.assertEqual(count, 34) ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22284 - /trunk/specific_analyses/relax_disp/disp_data.py
Author: tlinnet Date: Mon Feb 24 14:20:43 2014 New Revision: 22284 URL: http://svn.gna.org/viewcvs/relax?rev=22284view=rev Log: Expanded the loop_time function to optional take the spectrometer frequency as input for restricting looping. Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis with two fields at two delay times. Modified: trunk/specific_analyses/relax_disp/disp_data.py Modified: trunk/specific_analyses/relax_disp/disp_data.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=22284r1=22283r2=22284view=diff == --- trunk/specific_analyses/relax_disp/disp_data.py (original) +++ trunk/specific_analyses/relax_disp/disp_data.py Mon Feb 24 14:20:43 2014 @@ -873,7 +873,7 @@ # Then the dispersion points. for point, di in loop_point(exp_type=exp_type, frq=frq, offset=offset, return_indices=True): # Finally the relaxation times. -for time, ti in loop_time(return_indices=True): +for time, ti in loop_time(frq=frq, return_indices=True): # Yield the data. if return_indices: yield exp_type, frq, offset, point, time, ei, mi, oi, di, ti @@ -1281,9 +1281,13 @@ yield id -def loop_time(return_indices=False): +def loop_time(exp_type=None, frq=None, return_indices=False): Generator method for looping over the relaxation times. +@keyword exp_type: The experiment type. +@type exp_type: str +@keyword frq: The spectrometer frequency in Hz. +@type frq: float @keyword return_indices:A flag which if True will cause the relaxation time index to be returned as well. @type return_indices: bool @return:The relaxation time. @@ -1296,6 +1300,28 @@ # Loop over the time points. if hasattr(cdp, 'relax_time_list'): for time in cdp.relax_time_list: +# Find a matching experiment ID. +found = False +for id in cdp.exp_type.keys(): +# Skip non-matching experiments. +if exp_type != None and cdp.exp_type[id] != exp_type: +continue + +# Skip non-matching spectrometer frequencies. +if frq != None and hasattr(cdp, 'spectrometer_frq') and cdp.spectrometer_frq[id] != frq: +continue + +if time != cdp.relax_times[id]: +continue + +# Found. +found = True +break + +# No data. +if not found: +continue + # Increment the index. ti += 1 ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22286 - in /branches/double_rotor: ./ specific_analyses/relax_disp/ test_suite/unit_tests/_specific_analyses/_relax_disp/
Author: bugman Date: Mon Feb 24 14:58:10 2014 New Revision: 22286 URL: http://svn.gna.org/viewcvs/relax?rev=22286view=rev Log: Merged revisions 22283-22285 via svnmerge from svn+ssh://bug...@svn.gna.org/svn/relax/trunk r22283 | tlinnet | 2014-02-24 14:20:41 +0100 (Mon, 24 Feb 2014) | 7 lines Added unit test for looping over: exp, frq, offset, point, time. Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis with two fields at two delay times. This unit test will fail, since the last loop over the time points has a weak assumption just to loop over all time points, instead of checking for existence of such time point. This unit test follows recommendation in thread: http://thread.gmane.org/gmane.science.nmr.relax.devel/5070. r22284 | tlinnet | 2014-02-24 14:20:43 +0100 (Mon, 24 Feb 2014) | 3 lines Expanded the loop_time function to optional take the spectrometer frequency as input for restricting looping. Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis with two fields at two delay times. r22285 | tlinnet | 2014-02-24 14:20:45 +0100 (Mon, 24 Feb 2014) | 3 lines Replaced print commands to be compatible with Python 3.x Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis with two fields at two delay times. Modified: branches/double_rotor/ (props changed) branches/double_rotor/specific_analyses/relax_disp/disp_data.py branches/double_rotor/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Propchange: branches/double_rotor/ -- --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Feb 24 14:58:10 2014 @@ -1,1 +1,1 @@ -/trunk:1-22281 +/trunk:1-22285 Modified: branches/double_rotor/specific_analyses/relax_disp/disp_data.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/specific_analyses/relax_disp/disp_data.py?rev=22286r1=22285r2=22286view=diff == --- branches/double_rotor/specific_analyses/relax_disp/disp_data.py (original) +++ branches/double_rotor/specific_analyses/relax_disp/disp_data.py Mon Feb 24 14:58:10 2014 @@ -873,7 +873,7 @@ # Then the dispersion points. for point, di in loop_point(exp_type=exp_type, frq=frq, offset=offset, return_indices=True): # Finally the relaxation times. -for time, ti in loop_time(return_indices=True): +for time, ti in loop_time(frq=frq, return_indices=True): # Yield the data. if return_indices: yield exp_type, frq, offset, point, time, ei, mi, oi, di, ti @@ -1281,9 +1281,13 @@ yield id -def loop_time(return_indices=False): +def loop_time(exp_type=None, frq=None, return_indices=False): Generator method for looping over the relaxation times. +@keyword exp_type: The experiment type. +@type exp_type: str +@keyword frq: The spectrometer frequency in Hz. +@type frq: float @keyword return_indices:A flag which if True will cause the relaxation time index to be returned as well. @type return_indices: bool @return:The relaxation time. @@ -1296,6 +1300,28 @@ # Loop over the time points. if hasattr(cdp, 'relax_time_list'): for time in cdp.relax_time_list: +# Find a matching experiment ID. +found = False +for id in cdp.exp_type.keys(): +# Skip non-matching experiments. +if exp_type != None and cdp.exp_type[id] != exp_type: +continue + +# Skip non-matching spectrometer frequencies. +if frq != None and hasattr(cdp, 'spectrometer_frq') and cdp.spectrometer_frq[id] != frq: +continue + +if time != cdp.relax_times[id]: +continue + +# Found. +found = True +break + +# No data. +if not found: +continue + # Increment the index. ti += 1 Modified: branches/double_rotor/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22286r1=22285r2=22286view=diff == --- branches/double_rotor/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py (original) +++ branches/double_rotor/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Mon Feb 24 14:58:10 2014 @@
r22287 - /trunk/auto_analyses/relax_disp.py
Author: bugman Date: Mon Feb 24 15:17:35 2014 New Revision: 22287 URL: http://svn.gna.org/viewcvs/relax?rev=22287view=rev Log: More fixes for the relaxation dispersion auto-analysis for the pipe names now including the bundle name. Modified: trunk/auto_analyses/relax_disp.py Modified: trunk/auto_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_disp.py?rev=22287r1=22286r2=22287view=diff == --- trunk/auto_analyses/relax_disp.py (original) +++ trunk/auto_analyses/relax_disp.py Mon Feb 24 15:17:35 2014 @@ -404,10 +404,10 @@ self.interpreter.results.read(file='results', dir=path) # Copy the parameters. -self.interpreter.relax_disp.parameter_copy(pipe_from=pipe_name, pipe_to=model) +self.interpreter.relax_disp.parameter_copy(pipe_from=pipe_name, pipe_to=self.name_pipe(model)) # Finally, switch back to the original data pipe and delete the temporary one. -self.interpreter.pipe.switch(pipe_name=model) +self.interpreter.pipe.switch(pipe_name=self.name_pipe(model)) self.interpreter.pipe.delete(pipe_name=pipe_name) ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22288 - /trunk/auto_analyses/relax_disp.py
Author: bugman Date: Mon Feb 24 16:29:07 2014 New Revision: 22288 URL: http://svn.gna.org/viewcvs/relax?rev=22288view=rev Log: Added some missing RelaxError imports to the dispersion auto-analysis. Modified: trunk/auto_analyses/relax_disp.py Modified: trunk/auto_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_disp.py?rev=22288r1=22287r2=22288view=diff == --- trunk/auto_analyses/relax_disp.py (original) +++ trunk/auto_analyses/relax_disp.py Mon Feb 24 16:29:07 2014 @@ -29,6 +29,7 @@ from warnings import warn # relax module imports. +from lib.errors import RelaxError, RelaxNoPipeError from lib.list import unique_elements from lib.text.sectioning import section, subsection, subtitle, title from lib.warnings import RelaxWarning ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22289 - in /trunk/test_suite: shared_data/dispersion/bug_21715_clustered_indexerror/ shared_data/dispersion/bug_21715_clust...
Author: bugman Date: Mon Feb 24 16:33:08 2014 New Revision: 22289 URL: http://svn.gna.org/viewcvs/relax?rev=22289view=rev Log: Created the Relax_disp.test_bug_21715_clustered_indexerror system test. This is to catch bug #21715 (https://gna.org/bugs/?21715), the failure of the relaxation dispersion auto-analysis when running a clustered analysis due to an IndexError during minimisation. Added: trunk/test_suite/shared_data/dispersion/bug_21715_clustered_indexerror/ trunk/test_suite/shared_data/dispersion/bug_21715_clustered_indexerror/non_clustered/ trunk/test_suite/shared_data/dispersion/bug_21715_clustered_indexerror/non_clustered/No Rex/ trunk/test_suite/shared_data/dispersion/bug_21715_clustered_indexerror/non_clustered/No Rex/results.bz2 (with props) trunk/test_suite/shared_data/dispersion/bug_21715_clustered_indexerror/state.bz2 (with props) Modified: trunk/test_suite/system_tests/relax_disp.py Added: trunk/test_suite/shared_data/dispersion/bug_21715_clustered_indexerror/non_clustered/No Rex/results.bz2 URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/bug_21715_clustered_indexerror/non_clustered/No%20Rex/results.bz2?rev=22289view=auto == Binary file - no diff available. Propchange: trunk/test_suite/shared_data/dispersion/bug_21715_clustered_indexerror/non_clustered/No Rex/results.bz2 -- svn:mime-type = application/octet-stream Added: trunk/test_suite/shared_data/dispersion/bug_21715_clustered_indexerror/state.bz2 URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/bug_21715_clustered_indexerror/state.bz2?rev=22289view=auto == Binary file - no diff available. Propchange: trunk/test_suite/shared_data/dispersion/bug_21715_clustered_indexerror/state.bz2 -- svn:mime-type = application/octet-stream Modified: trunk/test_suite/system_tests/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=22289r1=22288r2=22289view=diff == --- trunk/test_suite/system_tests/relax_disp.py (original) +++ trunk/test_suite/system_tests/relax_disp.py Mon Feb 24 16:33:08 2014 @@ -295,6 +295,23 @@ relax_disp.Relax_disp.opt_func_tol = 1e-5 relax_disp.Relax_disp.opt_max_iterations = 1000 relax_disp.Relax_disp(pipe_name=compare_128_FT_R2eff, pipe_bundle=cpmg_disp_sod1d90a, results_dir=self.tmpdir, models=['R2eff'], grid_inc=3, mc_sim_num=5, modsel='AIC', pre_run_dir=None, insignificance=1.0, numeric_only=False, mc_sim_all_models=False, eliminate=True) + + +def test_bug_21715_clustered_indexerror(self): +Catch U{bug #21715https://gna.org/bugs/?21715}, the failure of a clustered auto-analysis due to an IndexError. + +# Clear the data store. +self.interpreter.reset() + +# Load the state. +state = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21715_clustered_indexerror'+sep+'state.bz2' +self.interpreter.state.load(state, force=True) + +# Execute the auto-analysis (fast). +pre_run_dir = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21715_clustered_indexerror'+sep+'non_clustered' +relax_disp.Relax_disp.opt_func_tol = 1e-5 +relax_disp.Relax_disp.opt_max_iterations = 1000 +relax_disp.Relax_disp(pipe_name='origin - relax_disp (Sun Feb 23 19:36:51 2014)', pipe_bundle='relax_disp (Sun Feb 23 19:36:51 2014)', results_dir=self.tmpdir, models=['R2eff', 'No Rex'], grid_inc=11, mc_sim_num=2, modsel='AIC', pre_run_dir=pre_run_dir, insignificance=1.0, numeric_only=True, mc_sim_all_models=False, eliminate=True) def test_curve_type_cpmg_fixed_time(self): ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22290 - in /branches/double_rotor: ./ auto_analyses/relax_disp.py
Author: bugman Date: Mon Feb 24 16:40:09 2014 New Revision: 22290 URL: http://svn.gna.org/viewcvs/relax?rev=22290view=rev Log: Merged revisions 22287-22288 via svnmerge from svn+ssh://bug...@svn.gna.org/svn/relax/trunk r22287 | bugman | 2014-02-24 15:17:35 +0100 (Mon, 24 Feb 2014) | 3 lines More fixes for the relaxation dispersion auto-analysis for the pipe names now including the bundle name. r22288 | bugman | 2014-02-24 16:29:07 +0100 (Mon, 24 Feb 2014) | 3 lines Added some missing RelaxError imports to the dispersion auto-analysis. Modified: branches/double_rotor/ (props changed) branches/double_rotor/auto_analyses/relax_disp.py Propchange: branches/double_rotor/ -- --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Feb 24 16:40:09 2014 @@ -1,1 +1,1 @@ -/trunk:1-22285 +/trunk:1-22288 Modified: branches/double_rotor/auto_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/auto_analyses/relax_disp.py?rev=22290r1=22289r2=22290view=diff == --- branches/double_rotor/auto_analyses/relax_disp.py (original) +++ branches/double_rotor/auto_analyses/relax_disp.py Mon Feb 24 16:40:09 2014 @@ -29,6 +29,7 @@ from warnings import warn # relax module imports. +from lib.errors import RelaxError, RelaxNoPipeError from lib.list import unique_elements from lib.text.sectioning import section, subsection, subtitle, title from lib.warnings import RelaxWarning @@ -404,10 +405,10 @@ self.interpreter.results.read(file='results', dir=path) # Copy the parameters. -self.interpreter.relax_disp.parameter_copy(pipe_from=pipe_name, pipe_to=model) +self.interpreter.relax_disp.parameter_copy(pipe_from=pipe_name, pipe_to=self.name_pipe(model)) # Finally, switch back to the original data pipe and delete the temporary one. -self.interpreter.pipe.switch(pipe_name=model) +self.interpreter.pipe.switch(pipe_name=self.name_pipe(model)) self.interpreter.pipe.delete(pipe_name=pipe_name) ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22293 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
Author: tlinnet Date: Mon Feb 24 17:06:36 2014 New Revision: 22293 URL: http://svn.gna.org/viewcvs/relax?rev=22293view=rev Log: Added system test for loop_time. Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis with two fields at two delay times. This system can be extended later for purposes to test the restriction of the looping. Modified: trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Modified: trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22293r1=22292r2=22293view=diff == --- trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py (original) +++ trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Mon Feb 24 17:06:36 2014 @@ -25,7 +25,7 @@ # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() from pipe_control import state -from specific_analyses.relax_disp.disp_data import loop_exp_frq, loop_exp_frq_offset, loop_exp_frq_offset_point, loop_exp_frq_offset_point_time +from specific_analyses.relax_disp.disp_data import loop_exp_frq, loop_exp_frq_offset, loop_exp_frq_offset_point, loop_exp_frq_offset_point_time, loop_time from status import Status; status = Status() from test_suite.unit_tests.base_classes import UnitTestCase @@ -291,3 +291,38 @@ j += 1 self.assertEqual(time, time_T2_2) self.assertAlmostEqual(point, cpmg_2[j],3) + + +def test_loop_time(self): +Unit test of the loop_time() function. + +This uses the data of the saved state attached to U{bug #21665https://gna.org/bugs/?21665}. + + +# Load the state. +statefile = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21665.bz2' +state.load_state(statefile, force=True) + +# Original data (exp_type, frq, offset, point). +data = [ +['SQ CPMG', 499862140.0, 0, [50.0, 100.0, 150.0, 200.0, 250.0, 300.0, 350.0, 400.0, 450.0, 500.0, 550.0, 600.0, 650.0, 700.0, 800.0, 900.0, 1000.0],0.04], +['SQ CPMG', 599890858.6993, 0, [33., 66.666, 100.0, 133.333, 166.666, 200.0, 233.333, 266.666, 300.0, 333.333, 366.666, 400.0, 466.666, 533.333, 666.666, 866.666, 1000.0],0.06] +] + +# Original indices (ei, mi, oi, ti). +indices = [ +[0, 0, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], 0], +[0, 1, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], 0] +] + +# Check the number of iterations. +print(Checking the number of iterations of the loop.) +count_frq = 0 +for dat in data: +frq = dat[1] +for time, ti in loop_time(frq=frq, return_indices=True): +print(time, ti) +count_frq += 1 +self.assertEqual(count_frq, 2) + + ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22291 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
Author: tlinnet Date: Mon Feb 24 17:06:33 2014 New Revision: 22291 URL: http://svn.gna.org/viewcvs/relax?rev=22291view=rev Log: Modified unit test to pass. Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis with two fields at two delay times. Implemented as suggested in: https://mail.gna.org/public/relax-devel/2014-02/msg00142.html Modified: trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Modified: trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22291r1=22290r2=22291view=diff == --- trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py (original) +++ trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py Mon Feb 24 17:06:33 2014 @@ -214,7 +214,7 @@ # Original indices (ei, mi, oi). indices = [ [0, 0, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], 0], -[0, 1, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], 1] +[0, 1, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], 0] ] # Check the number of iterations. ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22292 - /trunk/specific_analyses/relax_disp/disp_data.py
Author: tlinnet Date: Mon Feb 24 17:06:35 2014 New Revision: 22292 URL: http://svn.gna.org/viewcvs/relax?rev=22292view=rev Log: Expanded the loop_time function to optional take the offset and dispersion point as input for restricting looping. Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis with two fields at two delay times. This is implemented as suggested in: https://mail.gna.org/public/relax-devel/2014-02/msg00143.html Modified: trunk/specific_analyses/relax_disp/disp_data.py Modified: trunk/specific_analyses/relax_disp/disp_data.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=22292r1=22291r2=22292view=diff == --- trunk/specific_analyses/relax_disp/disp_data.py (original) +++ trunk/specific_analyses/relax_disp/disp_data.py Mon Feb 24 17:06:35 2014 @@ -1281,13 +1281,17 @@ yield id -def loop_time(exp_type=None, frq=None, return_indices=False): +def loop_time(exp_type=None, frq=None, offset=None, point=None, return_indices=False): Generator method for looping over the relaxation times. @keyword exp_type: The experiment type. @type exp_type: str @keyword frq: The spectrometer frequency in Hz. @type frq: float +@keyword offset:The spin-lock or hard pulse offset value in ppm. +@type offset: None or float +@keyword point: The dispersion point data (either the spin-lock field strength in Hz or the nu_CPMG frequency in Hz). +@type point:float @keyword return_indices:A flag which if True will cause the relaxation time index to be returned as well. @type return_indices: bool @return:The relaxation time. @@ -1310,6 +1314,25 @@ # Skip non-matching spectrometer frequencies. if frq != None and hasattr(cdp, 'spectrometer_frq') and cdp.spectrometer_frq[id] != frq: continue + +# Skip non-matching offsets. +if offset != None and hasattr(cdp, 'spin_lock_offset') and cdp.spin_lock_offset[id] != offset: +continue + +# The dispersion point filter. +if point != None: +# No experiment type set. +if not hasattr(cdp, 'exp_type') or id not in cdp.exp_type: +continue + +# The experiment type. +exp_type = cdp.exp_type[id] + +# The CPMG dispersion data. +if exp_type in EXP_TYPE_LIST_CPMG: +# No dispersion point data set. +if not hasattr(cdp, 'cpmg_frqs') or id not in cdp.cpmg_frqs: +continue if time != cdp.relax_times[id]: continue ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits
r22294 - in /trunk/specific_analyses/relax_disp: api.py disp_data.py
Author: tlinnet Date: Mon Feb 24 18:28:11 2014 New Revision: 22294 URL: http://svn.gna.org/viewcvs/relax?rev=22294view=rev Log: Replacing looping over time points from cdp.relax_time_list to loop_time(frq=frq). Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis with two fields at two delay times. loop_time has been modified to accept spectrometer frequency as input to restrict the looping. Modified: trunk/specific_analyses/relax_disp/api.py trunk/specific_analyses/relax_disp/disp_data.py Modified: trunk/specific_analyses/relax_disp/api.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/api.py?rev=22294r1=22293r2=22294view=diff == --- trunk/specific_analyses/relax_disp/api.py (original) +++ trunk/specific_analyses/relax_disp/api.py Mon Feb 24 18:28:11 2014 @@ -149,7 +149,7 @@ values = [] errors = [] times = [] -for time in cdp.relax_time_list: +for time in loop_time(frq=frq): # The data. values.append(average_intensity(spin=spin, exp_type=exp_type, frq=frq, offset=offset, point=point, time=time)) errors.append(average_intensity(spin=spin, exp_type=exp_type, frq=frq, offset=offset, point=point, time=time, error=True)) @@ -378,7 +378,7 @@ values = [] errors = [] times = [] -for time in cdp.relax_time_list: +for time in loop_time(frq=frq): values.append(average_intensity(spin=spin, exp_type=exp_type, frq=frq, offset=offset, point=point, time=time, sim_index=sim_index)) errors.append(average_intensity(spin=spin, exp_type=exp_type, frq=frq, offset=offset, point=point, time=time, error=True)) times.append(time) @@ -1373,7 +1373,7 @@ # Generate the data structure to return. errors = [] -for time in cdp.relax_time_list: +for time in loop_time(frq=frq): errors.append(average_intensity(spin=spin, exp_type=exp_type, frq=frq, offset=offset, point=point, time=time, error=True)) # All other models. @@ -1597,7 +1597,7 @@ # Loop over each time point. ti = 0 -for time in loop_time(): +for time in loop_time(frq=frq): # Get the intensity keys. int_keys = find_intensity_keys(exp_type=exp_type, frq=frq, point=point, time=time) Modified: trunk/specific_analyses/relax_disp/disp_data.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=22294r1=22293r2=22294view=diff == --- trunk/specific_analyses/relax_disp/disp_data.py (original) +++ trunk/specific_analyses/relax_disp/disp_data.py Mon Feb 24 18:28:11 2014 @@ -1930,7 +1930,7 @@ set_labels.append(Spin %s % id) # Loop over the relaxation time periods. -for time in cdp.relax_time_list: +for time in loop_time(frq=frq): # The key. keys = find_intensity_keys(exp_type=exp_type, frq=frq, point=point, time=time) ___ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits