mailr22705 - in /trunk/specific_analyses: api_base.py parameter_object.py


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

Header


Content

Posted by edward on April 11, 2014 - 07:33:
Author: bugman
Date: Fri Apr 11 07:33:22 2014
New Revision: 22705

URL: http://svn.gna.org/viewcvs/relax?rev=22705&view=rev
Log:
Shifted the core of the data_names() specific analysis API method into the 
parameter list object.


Modified:
    trunk/specific_analyses/api_base.py
    trunk/specific_analyses/parameter_object.py

Modified: trunk/specific_analyses/api_base.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/api_base.py?rev=22705&r1=22704&r2=22705&view=diff
==============================================================================
--- trunk/specific_analyses/api_base.py (original)
+++ trunk/specific_analyses/api_base.py Fri Apr 11 07:33:22 2014
@@ -178,15 +178,8 @@
         @rtype:                 list of str
         """
 
-        # Initialise.
-        names = []
-
-        # Loop over the parameters.
-        for name in self._PARAMS.loop(set=set, scope=scope, 
error_names=error_names, sim_names=sim_names):
-            names.append(name)
-
         # Return the names.
-        return names
+        return self._PARAMS.data_names(set=set, scope=scope, 
error_names=error_names, sim_names=sim_names)
 
 
     def data_type(self, param=None):

Modified: trunk/specific_analyses/parameter_object.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/parameter_object.py?rev=22705&r1=22704&r2=22705&view=diff
==============================================================================
--- trunk/specific_analyses/parameter_object.py (original)
+++ trunk/specific_analyses/parameter_object.py Fri Apr 11 07:33:22 2014
@@ -321,6 +321,32 @@
         return False
 
 
+    def data_names(self, set='all', scope=None, error_names=False, 
sim_names=False):
+        """Return a list of names of data structures.
+
+        @keyword set:           The set of object names to return.  This can 
be set to 'all' for all names, to 'generic' for generic object names, 
'params' for analysis specific parameter names, or to 'min' for minimisation 
specific object names.
+        @type set:              str
+        @keyword scope:         The scope of the parameter to return.  If 
not set, then all will be returned.  If set to 'global' or 'spin', then only 
the parameters within that scope will be returned.
+        @type scope:            str or None
+        @keyword error_names:   A flag which if True will add the error 
object names as well.
+        @type error_names:      bool
+        @keyword sim_names:     A flag which if True will add the Monte 
Carlo simulation object names as well.
+        @type sim_names:        bool
+        @return:                The list of object names.
+        @rtype:                 list of str
+        """
+
+        # Initialise.
+        names = []
+
+        # Loop over the parameters.
+        for name in self.loop(set=set, scope=scope, error_names=error_names, 
sim_names=sim_names):
+            names.append(name)
+
+        # Return the names.
+        return names
+
+
     def get_conv_factor(self, name):
         """Return the conversion factor.
 




Related Messages


Powered by MHonArc, Updated Fri Apr 11 08:20:02 2014