mailr21283 - /branches/relax_disp/specific_analyses/relax_disp/disp_data.py


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

Header


Content

Posted by edward on October 28, 2013 - 16:01:
Author: bugman
Date: Mon Oct 28 16:01:10 2013
New Revision: 21283

URL: http://svn.gna.org/viewcvs/relax?rev=21283&view=rev
Log:
Improvements for the relax_disp.insignificance user function.

Text is now printed out when a spin is deselected.  And all spins set to the 
'R2eff' model are
skipped.


Modified:
    branches/relax_disp/specific_analyses/relax_disp/disp_data.py

Modified: branches/relax_disp/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/disp_data.py?rev=21283&r1=21282&r2=21283&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp/disp_data.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp/disp_data.py Mon Oct 28 
16:01:10 2013
@@ -434,6 +434,10 @@
 
     # Loop over all spins.
     for spin, spin_id in spin_loop(return_id=True, skip_desel=True):
+        # Nothing to do (the R2eff model has no dispersion curves).
+        if spin.model == 'R2eff':
+            continue
+
         # Get all the data.
         values, errors, missing, frqs, exp_types = 
return_r2eff_arrays(spins=[spin], spin_ids=[spin_id], fields=fields, 
field_count=field_count)
 
@@ -441,6 +445,7 @@
         desel = True
 
         # Loop over the experiments.
+        max_diff = 0.0
         for exp_index in range(len(values)):
             # Loop over the magnetic fields.
             for frq_index in range(len(values[exp_index, 0])):
@@ -448,9 +453,15 @@
                 diff = values[exp_index, 0,frq_index].max() - 
values[exp_index, 0,frq_index].min()
                 if diff > level:
                     desel = False
+                if diff > max_diff:
+                    max_diff = diff
 
         # Deselect the spin.
         if desel:
+            # Printout.
+            print("Deselecting spin '%s', the maximum dispersion curve 
difference for all curves is %s rad/s." % (spin_id, max_diff))
+
+            # Deselection.
             desel_spin(spin_id)
 
 




Related Messages


Powered by MHonArc, Updated Mon Oct 28 16:20:02 2013