mailr7999 - /branches/spectral_errors/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 November 21, 2008 - 09:57:
Author: bugman
Date: Fri Nov 21 09:57:35 2008
New Revision: 7999

URL: http://svn.gna.org/viewcvs/relax?rev=7999&view=rev
Log:
Copied the NOE set_error() function to generic_fns.spectrum.baseplane_rmsd().

The class method has been converted to a module function.


Modified:
    branches/spectral_errors/generic_fns/spectrum.py

Modified: branches/spectral_errors/generic_fns/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/spectral_errors/generic_fns/spectrum.py?rev=7999&r1=7998&r2=7999&view=diff
==============================================================================
--- branches/spectral_errors/generic_fns/spectrum.py (original)
+++ branches/spectral_errors/generic_fns/spectrum.py Fri Nov 21 09:57:35 2008
@@ -70,6 +70,38 @@
     # Unsupported format.
     raise RelaxError, "The format of the peak list file cannot be 
determined.  Either the file is of a non-standard format or the format is 
unsupported."
 
+
+def baseplane_rmsd(error=0.0, spectrum_id=None, spin_id=None):
+    """Set the peak intensity errors, as defined as the baseplane RMSD.
+
+    @param error:           The peak intensity error value defined as the 
RMSD of the base plane
+                            noise.
+    @type error:            float
+    @keyword spectrum_id:   The spectrum id.
+    @type spectrum_id:      str
+    @param spin_id:         The spin identification string.
+    @type spin_id:          str
+    """
+
+    # Test if the current pipe exists
+    pipes.test()
+
+    # Test if the sequence data is loaded.
+    if not exists_mol_res_spin_data():
+        raise RelaxNoSequenceError
+
+    # Loop over the spins.
+    for spin in spin_loop(spin_id):
+        # Skip deselected spins.
+        if not spin.select:
+            continue
+
+        # Set the error.
+        if spectrum_id == 'ref':
+            spin.ref_err = float(error)
+        elif spectrum_id == 'sat':
+            spin.sat_err = float(error)
+            
 
 def det_dimensions(file_data, proton, heteronuc, int_col):
     """Determine which are the proton and heteronuclei dimensions of the 
XEasy text file.




Related Messages


Powered by MHonArc, Updated Fri Nov 21 10:20:04 2008