mailr19554 - in /branches/relax_disp: ./ gui/wizards/peak_intensity.py


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

Header


Content

Posted by edward on April 21, 2013 - 18:46:
Author: bugman
Date: Sun Apr 21 18:46:34 2013
New Revision: 19554

URL: http://svn.gna.org/viewcvs/relax?rev=19554&view=rev
Log:
Merged revisions 19552-19553 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r19552 | bugman | 2013-04-21 18:34:32 +0200 (Sun, 21 Apr 2013) | 3 lines
  
  Alphabetical ordering of the methods in the gui.wizards.peak_intensity 
module.
........
  r19553 | bugman | 2013-04-21 18:46:12 +0200 (Sun, 21 Apr 2013) | 5 lines
  
  Simplified all of the peak analysis wizard wizard_update_*() methods.
  
  They now all defer to the wizard_update_ids() method which updates the 
spectrum ID fields.
........

Modified:
    branches/relax_disp/   (props changed)
    branches/relax_disp/gui/wizards/peak_intensity.py

Propchange: branches/relax_disp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Apr 21 18:46:34 2013
@@ -1,1 +1,1 @@
-/trunk:1-19550
+/trunk:1-19553

Modified: branches/relax_disp/gui/wizards/peak_intensity.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/wizards/peak_intensity.py?rev=19554&r1=19553&r2=19554&view=diff
==============================================================================
--- branches/relax_disp/gui/wizards/peak_intensity.py (original)
+++ branches/relax_disp/gui/wizards/peak_intensity.py Sun Apr 21 18:46:34 2013
@@ -205,62 +205,6 @@
             return self._num_pages + 1
 
 
-    def wizard_update_pts(self):
-        """Update the spectrum.replicated page based on previous data."""
-
-        # The spectrum.read_intensities page.
-        page = self.get_page(self.page_indices['read'])
-
-        # Set the spectrum ID.
-        id = page.uf_args['spectrum_id'].GetValue()
-
-        # Set the ID in the spectrum.replicated page.
-        page = self.get_page(self.page_indices['pts'])
-        page.uf_args['spectrum_id'].SetValue(id)
-
-
-    def wizard_update_repl(self):
-        """Update the spectrum.replicated page based on previous data."""
-
-        # The spectrum.read_intensities page.
-        page = self.get_page(self.page_indices['read'])
-
-        # Set the spectrum ID.
-        id = page.uf_args['spectrum_id'].GetValue()
-
-        # Set the ID in the spectrum.replicated page.
-        page = self.get_page(self.page_indices['repl'])
-        page.uf_args['spectrum_ids'].SetValue(value=id, index=0)
-
-
-    def wizard_update_rmsd(self):
-        """Update the spectrum.baseplane_rmsd page based on previous data."""
-
-        # The spectrum.read_intensities page.
-        page = self.get_page(self.page_indices['read'])
-
-        # Set the spectrum ID.
-        id = page.uf_args['spectrum_id'].GetValue()
-
-        # Set the ID in the spectrum.baseplane_rmsd page.
-        page = self.get_page(self.page_indices['rmsd'])
-        page.uf_args['spectrum_id'].SetValue(id)
-
-
-    def wizard_update_relax_fit_relax_time(self):
-        """Update the relax_fit.relax_time page based on previous data."""
-
-        # The spectrum.read_intensities page.
-        page = self.get_page(self.page_indices['read'])
-
-        # Set the spectrum ID.
-        id = page.uf_args['spectrum_id'].GetValue()
-
-        # Set the ID in the relax_fit.relax_time page.
-        page = self.get_page(self.page_indices['relax_time'])
-        page.uf_args['spectrum_id'].SetValue(id)
-
-
     def wizard_update_noe_spectrum_type(self):
         """Update the noe.spectrum_type page based on previous data."""
 
@@ -273,6 +217,59 @@
         # Set the ID in the noe.spectrum_type page.
         page = self.get_page(self.page_indices['spectrum_type'])
         page.uf_args['spectrum_id'].SetValue(id)
+
+
+    def wizard_update_ids(self, page_key=None, arg_key='spectrum_id', 
index=None):
+        """Update the spectrum ID on the page specified by the key based on 
previous data.
+
+        @keyword page_key:  The key of the page to update.
+        @type page_key:     str
+        @keyword arg_key:   The key of the page argument to change to the 
spectrum ID.
+        @type arg_key:      str
+        @keyword index:     The index for list type structures.
+        @type index:        None or int
+        """
+
+        # The spectrum.read_intensities page.
+        page = self.get_page(self.page_indices['read'])
+
+        # Set the spectrum ID.
+        id = page.uf_args['spectrum_id'].GetValue()
+
+        # Set the ID in the page.
+        page = self.get_page(self.page_indices[page_key])
+        if index == None:
+            page.uf_args[arg_key].SetValue(id)
+        else:
+            page.uf_args[arg_key].SetValue(value=id, index=index)
+
+
+    def wizard_update_pts(self):
+        """Update the spectrum.replicated page based on previous data."""
+
+        # Update the spectrum ID.
+        self.wizard_update_ids(page_key='pts')
+
+
+    def wizard_update_relax_fit_relax_time(self):
+        """Update the relax_fit.relax_time page based on previous data."""
+
+        # Update the spectrum ID.
+        self.wizard_update_ids(page_key='relax_time')
+
+
+    def wizard_update_repl(self):
+        """Update the spectrum.replicated page based on previous data."""
+
+        # Update the spectrum ID.
+        self.wizard_update_ids(page_key='repl', arg_key='spectrum_ids', 
index=0)
+
+
+    def wizard_update_rmsd(self):
+        """Update the spectrum.baseplane_rmsd page based on previous data."""
+
+        # Update the spectrum ID.
+        self.wizard_update_ids(page_key='rmsd')
 
 
 




Related Messages


Powered by MHonArc, Updated Sun Apr 21 19:00:02 2013