mailr16167 - /branches/uf_redesign/generic_fns/spectrum.py


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

Header


Content

Posted by edward on May 09, 2012 - 18:23:
Author: bugman
Date: Wed May  9 18:23:22 2012
New Revision: 16167

URL: http://svn.gna.org/viewcvs/relax?rev=16167&view=rev
Log:
Created the generic_fns.spectrum.get_ids() function for returning all current 
spectrum IDs.

This will be used by the noe.read_intensities user function.


Modified:
    branches/uf_redesign/generic_fns/spectrum.py

Modified: branches/uf_redesign/generic_fns/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/generic_fns/spectrum.py?rev=16167&r1=16166&r2=16167&view=diff
==============================================================================
--- branches/uf_redesign/generic_fns/spectrum.py (original)
+++ branches/uf_redesign/generic_fns/spectrum.py Wed May  9 18:23:22 2012
@@ -645,6 +645,21 @@
 
             # Set the errors.
             __errors_repl()
+
+
+def get_ids():
+    """Return a list of all spectrum IDs.
+
+    @return:    The list of spectrum IDs.
+    @rtype:     list of str
+    """
+
+    # No IDs.
+    if not hasattr(cdp, 'spectrum_ids'):
+        return []
+
+    # Return the IDs.
+    return cdp.spectrum_ids
 
 
 def intensity_generic(file_data=None, spin_id_col=None, mol_name_col=None, 
res_num_col=None, res_name_col=None, spin_num_col=None, spin_name_col=None, 
data_col=None, sep=None, spin_id=None):




Related Messages


Powered by MHonArc, Updated Wed May 09 18:40:02 2012