mailr14646 - /1.3/prompt/spectrum.py


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

Header


Content

Posted by edward on September 15, 2011 - 13:30:
Author: bugman
Date: Thu Sep 15 13:30:26 2011
New Revision: 14646

URL: http://svn.gna.org/viewcvs/relax?rev=14646&view=rev
Log:
Implemented the front end of the spectrum.delete user function.

This will be used to delete spectral data from the relax data store.  It will 
be useful in the GUI
if a mistake has been made.



Modified:
    1.3/prompt/spectrum.py

Modified: 1.3/prompt/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/spectrum.py?rev=14646&r1=14645&r2=14646&view=diff
==============================================================================
--- 1.3/prompt/spectrum.py (original)
+++ 1.3/prompt/spectrum.py Thu Sep 15 13:30:26 2011
@@ -62,6 +62,36 @@
         The spectrum ID identifies the spectrum associated with the error 
and must correspond to a previously loaded set of intensities.  If the spin 
ID is unset, then the error value for all spins will be set to the supplied 
value.
         """
     _build_doc(baseplane_rmsd)
+
+
+    def delete(self, spectrum_id=None):
+        # Function intro text.
+        if self._exec_info.intro:
+            text = self._exec_info.ps3 + "spectrum.delete("
+            text = text + "spectrum_id=" + repr(spectrum_id) + ")"
+            print(text)
+
+        # The argument checks.
+        arg_check.is_str(spectrum_id, 'spectrum ID string')
+
+        # Execute the functional code.
+        spectrum.delete(spectrum_id=spectrum_id)
+
+    # The function doc info.
+    delete._doc_title = "Delete the spectral data corresponding to the 
spectrum ID string."
+    delete._doc_title_short = "Spectral data deletion."
+    delete._doc_args = [
+        ["spectrum_id", "The unique spectrum ID string."]
+    ]
+    delete._doc_desc = """
+        The spectral data corresponding to the given spectrum ID string will 
be removed from the current data pipe.
+        """
+    delete._doc_examples = """
+        To delete the peak height data corresponding to the ID 'R1 ncyc5', 
type:
+
+        relax> spectrum.delete('R1 ncyc5')
+        """
+    _build_doc(delete)
 
 
     def error_analysis(self):




Related Messages


Powered by MHonArc, Updated Thu Sep 15 13:40:01 2011