mailr15247 - /1.3/specific_fns/jw_mapping.py


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

Header


Content

Posted by edward on January 25, 2012 - 14:39:
Author: bugman
Date: Wed Jan 25 14:39:13 2012
New Revision: 15247

URL: http://svn.gna.org/viewcvs/relax?rev=15247&view=rev
Log:
Fix for bug #19329 (https://gna.org/bugs/index.php?19329).

The spin is now deselected if there is really less than three data points, 
excluding data points of
None.


Modified:
    1.3/specific_fns/jw_mapping.py

Modified: 1.3/specific_fns/jw_mapping.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/jw_mapping.py?rev=15247&r1=15246&r2=15247&view=diff
==============================================================================
--- 1.3/specific_fns/jw_mapping.py (original)
+++ 1.3/specific_fns/jw_mapping.py Wed Jan 25 14:39:13 2012
@@ -314,9 +314,17 @@
                 spin.select = False
 
             # Require 3 or more data points.
-            elif len(spin.ri_data) < 3:
-                warn(RelaxDeselectWarning(spin_id, 'insufficient relaxation 
data, 3 or more data points are required'))
-                spin.select = False
+            else:
+                # Count the points.
+                data_points = 0
+                for id in cdp.ri_ids:
+                    if spin.ri_data.has_key(id) and spin.ri_data[id] != None:
+                        data_points += 1
+
+                # Not enough.
+                if data_points < 3:
+                    warn(RelaxDeselectWarning(spin_id, 'insufficient 
relaxation data, 3 or more data points are required'))
+                    spin.select = False
 
 
     return_data_name_doc = ["Reduced spectral density mapping data type 
string matching patterns", """




Related Messages


Powered by MHonArc, Updated Wed Jan 25 15:00:02 2012