mailr4663 - in /1.3: prompt/model_free.py specific_fns/model_free/model_free.py


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

Header


Content

Posted by edward on January 13, 2008 - 12:09:
Author: bugman
Date: Sun Jan 13 12:09:22 2008
New Revision: 4663

URL: http://svn.gna.org/viewcvs/relax?rev=4663&view=rev
Log:
Deleted the model_free.copy() user function.

This function was not used anywhere within relax and the model-free specific 
copy() method was
complete rubbish anyway (ancient, unused, broken code).


Modified:
    1.3/prompt/model_free.py
    1.3/specific_fns/model_free/model_free.py

Modified: 1.3/prompt/model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/model_free.py?rev=4663&r1=4662&r2=4663&view=diff
==============================================================================
--- 1.3/prompt/model_free.py (original)
+++ 1.3/prompt/model_free.py Sun Jan 13 12:09:22 2008
@@ -39,60 +39,6 @@
 
         # Place relax in the class namespace.
         self.__relax__ = relax
-
-
-    def copy(self, run1=None, run2=None, sim=None):
-        """Function for copying model-free data from run1 to run2.
-
-        Keyword Arguments
-        ~~~~~~~~~~~~~~~~~
-
-        run1:  The name of the run to copy the sequence from.
-
-        run2:  The name of the run to copy the sequence to.
-
-        sim:  The simulation number.
-
-
-        Description
-        ~~~~~~~~~~~
-
-        This function will copy all model-free data from 'run1' to 'run2'.  
Any model-free data in
-        'run2' will be overwritten.  If the argument 'sim' is an integer, 
then only data from that
-        simulation will be copied.
-
-
-        Examples
-        ~~~~~~~~
-
-        To copy all model-free data from the run 'm1' to the run 'm2', type:
-
-        relax> model_free.copy('m1', 'm2')
-        relax> model_free.copy(run1='m1', run2='m2')
-        """
-
-        # Function intro text.
-        if self.__relax__.interpreter.intro:
-            text = sys.ps3 + "model_free.copy("
-            text = text + "run1=" + `run1`
-            text = text + ", run2=" + `run2`
-            text = text + ", sim=" + `sim` + ")"
-            print text
-
-        # The run1 argument.
-        if type(run1) != str:
-            raise RelaxStrError, ('run1', run1)
-
-        # The run2 argument.
-        if type(run2) != str:
-            raise RelaxStrError, ('run2', run2)
-
-        # The sim argument.
-        if sim != None and type(sim) != int:
-            raise RelaxIntError, ('sim', sim)
-
-        # Execute the functional code.
-        model_free.copy(run1=run1, run2=run2, sim=sim)
 
 
     def create_model(self, run=None, model=None, equation=None, params=None, 
res_num=None):

Modified: 1.3/specific_fns/model_free/model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/model_free.py?rev=4663&r1=4662&r2=4663&view=diff
==============================================================================
--- 1.3/specific_fns/model_free/model_free.py (original)
+++ 1.3/specific_fns/model_free/model_free.py Sun Jan 13 12:09:22 2008
@@ -557,72 +557,6 @@
                 relax_data_store.chi2[self.run] = 
relax_data_store.chi2[self.run] + chi2
             else:
                 relax_data_store.res[self.run][i].chi2 = chi2
-
-
-    def copy(self, run1=None, run2=None, sim=None):
-        """Function for copying all model-free data from run1 to run2."""
-
-        # Test if run1 exists.
-        if not run1 in relax_data_store.run_names:
-            raise RelaxNoPipeError, run1
-
-        # Test if run2 exists.
-        if not run2 in relax_data_store.run_names:
-            raise RelaxNoPipeError, run2
-
-        # Test if the run type of run1 is set to 'mf'.
-        function_type = 
relax_data_store.run_types[relax_data_store.run_names.index(run1)]
-        if function_type != 'mf':
-            raise RelaxFuncSetupError, 
self.relax.specific_setup.get_string(function_type)
-
-        # Test if the run type of run2 is set to 'mf'.
-        function_type = 
relax_data_store.run_types[relax_data_store.run_names.index(run2)]
-        if function_type != 'mf':
-            raise RelaxFuncSetupError, 
self.relax.specific_setup.get_string(function_type)
-
-        # Test if the sequence data for run1 is loaded.
-        if not relax_data_store.res.has_key(run1):
-            raise RelaxNoSequenceError, run1
-
-        # Test if the sequence data for run2 is loaded.
-        if not relax_data_store.res.has_key(run2):
-            raise RelaxNoSequenceError, run2
-
-        # Get all data structure names.
-        names = self.data_names()
-
-        # Copy the data.
-        for i in xrange(len(relax_data_store.res[run1])):
-            # Remap the data structure 'relax_data_store.res[run1][i]'.
-            data1 = relax_data_store.res[run1][i]
-            data2 = relax_data_store.res[run2][i]
-
-            # Loop through the data structure names.
-            for name in names:
-                # All data.
-                if not sim:
-                    # Skip the data structure if it does not exist.
-                    if not hasattr(data1, name):
-                        continue
-
-                    # Copy the data structure.
-                    setattr(data2, name, deepcopy(getattr(data1, name)))
-
-                # Copy just the simulation data for the simulation 'sim'.
-                else:
-                    # Sim data name
-                    name = name + '_sim'
-
-                    # Skip the data structure if it does not exist in both 
runs.
-                    if not hasattr(data1, name) or not hasattr(data2, name):
-                        continue
-
-                    # Get the objects.
-                    object1 = getattr(data1, name)
-                    object2 = getattr(data2, name)
-
-                    # Copy the data.
-                    object2[sim] = object1[sim]
 
 
     def create_mc_data(self, run, i):




Related Messages


Powered by MHonArc, Updated Sun Jan 13 12:20:08 2008