mailr10271 - /branches/bieri_gui/gui_bieri/res/relax_control.py


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

Header


Content

Posted by edward on January 21, 2010 - 07:30:
Author: bugman
Date: Thu Jan 21 07:30:24 2010
New Revision: 10271

URL: http://svn.gna.org/viewcvs/relax?rev=10271&view=rev
Log:
Included a function to start model-free calculation from log windows and 
control it.

This corresponds to the include_modelfree_logwindow_patch file attached to 
https://gna.org/task/?6847 by
Michael Bieri (https://gna.org/users/michaelbieri), in the zip file 
100121_patches.tar.gz
(https://gna.org/support/download.php?file_id=7726).

This commit should have been in 2 patches - it includes a '/' to os.sep fix 
as well!


Modified:
    branches/bieri_gui/gui_bieri/res/relax_control.py

Modified: branches/bieri_gui/gui_bieri/res/relax_control.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/res/relax_control.py?rev=10271&r1=10270&r2=10271&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/res/relax_control.py (original)
+++ branches/bieri_gui/gui_bieri/res/relax_control.py Thu Jan 21 07:30:24 2010
@@ -33,6 +33,7 @@
 # relaxGUI modules
 from calc_rx import make_rx
 from calc_noe import make_noe
+from calc_modelfree import start_model_free
 
 
 class log_window(wx.Dialog):
@@ -71,6 +72,9 @@
         if WHICH_CALC == 'Noe':
             thread.start_new_thread(make_noe, (PARAMETERS[0], PARAMETERS[1], 
PARAMETERS[2], PARAMETERS[3], PARAMETERS[4], PARAMETERS[5], PARAMETERS[6], 
PARAMETERS[7], PARAMETERS[8], PARAMETERS[9], PARAMETERS[10], PARAMETERS[11], 
PARAMETERS[12], PARAMETERS[13], self))
 
+        if WHICH_CALC == 'Model-free':
+            thread.start_new_thread(start_model_free, (PARAMETERS[0], 
PARAMETERS[1], PARAMETERS[2], PARAMETERS[3], PARAMETERS[4], PARAMETERS[5],  
self))
+
 
 
     def __set_properties(self):
@@ -78,7 +82,7 @@
         # properties of GUI elements (used at start up)
         self.SetTitle("relaxGUI - Log Window")
         _icon = wx.EmptyIcon()
-        
_icon.CopyFromBitmap(wx.Bitmap("/home/michael/Programme/bieri_gui/gui_bieri/res/pics/relax.gif",
 wx.BITMAP_TYPE_ANY))
+        
_icon.CopyFromBitmap(wx.Bitmap(sys.path[-1]+sep+'gui_bieri'+sep+'res'+sep+'pics'+sep+'relax.gif',
 wx.BITMAP_TYPE_ANY))
         self.SetIcon(_icon)
         self.SetSize((600, 600))
         self.header_log.SetMinSize((600, 18))
@@ -164,3 +168,24 @@
     sys.stderr = sys.__stderr__ 
     return ''
 
+
+# Model-free Calculation
+
+def start_modelfree(self, model, automatic, global_setting, file_setting, 
sequencefile):
+
+    # define calculation
+    global WHICH_CALC
+    WHICH_CALC = 'Model-free'
+
+    # Parameters for calculation
+    global PARAMETERS
+    main = self
+    PARAMETERS = [main, model, automatic, global_setting, file_setting, 
sequencefile]
+
+    # launch log dialog
+    logwindow = log_window(None, -1, "")
+    logwindow.ShowModal()
+    sys.stdout = sys.__stdout__ 
+    sys.stderr = sys.__stderr__ 
+    return ''
+




Related Messages


Powered by MHonArc, Updated Thu Jan 21 07:40:02 2010