mailr21021 - /branches/relax_disp/auto_analyses/relax_disp.py


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

Header


Content

Posted by edward on October 09, 2013 - 16:48:
Author: bugman
Date: Wed Oct  9 16:48:05 2013
New Revision: 21021

URL: http://svn.gna.org/viewcvs/relax?rev=21021&view=rev
Log:
Modified the dispersion auto-analysis to check if peak intensity errors have 
been pre-calculated.

This allows the user to perform custom analyses and the auto-analysis will 
then not overwrite these
values.


Modified:
    branches/relax_disp/auto_analyses/relax_disp.py

Modified: branches/relax_disp/auto_analyses/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/auto_analyses/relax_disp.py?rev=21021&r1=21020&r2=21021&view=diff
==============================================================================
--- branches/relax_disp/auto_analyses/relax_disp.py (original)
+++ branches/relax_disp/auto_analyses/relax_disp.py Wed Oct  9 16:48:05 2013
@@ -128,6 +128,25 @@
     def error_analysis(self):
         """Perform an error analysis of the peak intensities for each field 
strength separately."""
 
+        # Check if intensity errors have already been calculated by the user.
+        precalc = True
+        for spin in spin_loop(skip_desel=True):
+            # No structure.
+            if not hasattr(spin, 'intensity_err'):
+                precalc = False
+                break
+
+            # Determine if a spectrum ID is missing from the list.
+            for id in cdp.spectrum_ids:
+                if id not in spin.intensity_err:
+                    precalc = False
+                    break
+
+        # Skip.
+        if precalc:
+            print("Skipping the error analysis as it has already been 
performed.")
+            return
+
         # Loop over the spectrometer frequencies.
         for frq in loop_frq():
             # Generate a list of spectrum IDs matching the frequency.




Related Messages


Powered by MHonArc, Updated Wed Oct 09 17:20:01 2013