mailr10500 - in /branches/bieri_gui/gui_bieri: execution/calc_modelfree.py misc.py


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

Header


Content

Posted by edward on January 28, 2010 - 13:28:
Author: bugman
Date: Thu Jan 28 13:28:29 2010
New Revision: 10500

URL: http://svn.gna.org/viewcvs/relax?rev=10500&view=rev
Log:
Renamed gui_bieri.execution.calc_modelfree to gui_bieri.misc.

This module now only contains the convert_to_float() function.  Therefore it 
has been shifted and
named into a module for miscellaneous GUI functions.


Added:
    branches/bieri_gui/gui_bieri/misc.py
      - copied, changed from r10499, 
branches/bieri_gui/gui_bieri/execution/calc_modelfree.py
Removed:
    branches/bieri_gui/gui_bieri/execution/calc_modelfree.py

Removed: branches/bieri_gui/gui_bieri/execution/calc_modelfree.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/execution/calc_modelfree.py?rev=10499&view=auto
==============================================================================
--- branches/bieri_gui/gui_bieri/execution/calc_modelfree.py (original)
+++ branches/bieri_gui/gui_bieri/execution/calc_modelfree.py (removed)
@@ -1,71 +1,0 @@
-###############################################################################
-#                                                                            
 #
-# Copyright (C) 2009 Michael Bieri                                           
 #
-# Copyright (C) 2010 Edward d'Auvergne                                       
 #
-#                                                                            
 #
-# This file is part of the program relax.                                    
 #
-#                                                                            
 #
-# relax 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 2 of the License, or          
 #
-# (at your option) any later version.                                        
 #
-#                                                                            
 #
-# relax 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 relax; if not, write to the Free Software                       
 #
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
 #
-#                                                                            
 #
-###############################################################################
-
-# script to calculate model-free models
-
-# Python module imports.
-import math
-from os import listdir, sep
-from re import search
-from string import replace
-import time
-import wx
-
-# relax module imports.
-from auto_analyses.dauvergne_protocol import dAuvergne_protocol
-from float import floatAsByteArray
-from generic_fns import diffusion_tensor, eliminate, fix, grace, minimise, 
model_selection, monte_carlo, pipes, relax_data, results, selection, 
sequence, spectrum, value
-from generic_fns.mol_res_spin import generate_spin_id, spin_index_loop, 
spin_loop
-import generic_fns.structure.main
-from relax_errors import RelaxError
-from specific_fns.setup import model_free_obj
-
-# relaxGUI module imports.
-from gui_bieri.message import relax_run_ok
-
-
-def convert_to_float(string):
-    """Method to convert a string like '1.02*1e-10' to a float variable.
-
-    @param string:  The number in string form.
-    @type string:   str
-    @return:        The floating point number.
-    @rtype:         float
-    """
-
-    # Break the number up.
-    entries = string.split('*')
-
-    # The first part of the number.
-    a = entries[0]
-    a = float(a)
-
-    # The second part of the number.
-    b = entries[1]
-    b = float(b[2:len(b)])
-
-    # Recombine.
-    result = a * math.pow(10, b)
-
-    # Return the float.
-    return result

Copied: branches/bieri_gui/gui_bieri/misc.py (from r10499, 
branches/bieri_gui/gui_bieri/execution/calc_modelfree.py)
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/misc.py?p2=branches/bieri_gui/gui_bieri/misc.py&p1=branches/bieri_gui/gui_bieri/execution/calc_modelfree.py&r1=10499&r2=10500&rev=10500&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/execution/calc_modelfree.py (original)
+++ branches/bieri_gui/gui_bieri/misc.py Thu Jan 28 13:28:29 2010
@@ -21,27 +21,12 @@
 #                                                                            
 #
 
###############################################################################
 
-# script to calculate model-free models
+# Module docstring.
+"""Miscellaneous functions used throughout the GUI."""
 
 # Python module imports.
-import math
-from os import listdir, sep
-from re import search
-from string import replace
-import time
-import wx
-
-# relax module imports.
-from auto_analyses.dauvergne_protocol import dAuvergne_protocol
-from float import floatAsByteArray
-from generic_fns import diffusion_tensor, eliminate, fix, grace, minimise, 
model_selection, monte_carlo, pipes, relax_data, results, selection, 
sequence, spectrum, value
-from generic_fns.mol_res_spin import generate_spin_id, spin_index_loop, 
spin_loop
-import generic_fns.structure.main
-from relax_errors import RelaxError
-from specific_fns.setup import model_free_obj
-
-# relaxGUI module imports.
-from gui_bieri.message import relax_run_ok
+from math import pow
+from string import split
 
 
 def convert_to_float(string):
@@ -54,7 +39,7 @@
     """
 
     # Break the number up.
-    entries = string.split('*')
+    entries = split('*')
 
     # The first part of the number.
     a = entries[0]
@@ -65,7 +50,7 @@
     b = float(b[2:len(b)])
 
     # Recombine.
-    result = a * math.pow(10, b)
+    result = a * pow(10, b)
 
     # Return the float.
     return result




Related Messages


Powered by MHonArc, Updated Thu Jan 28 13:40:02 2010