mailr21591 - /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 November 21, 2013 - 22:45:
Author: bugman
Date: Thu Nov 21 22:45:18 2013
New Revision: 21591

URL: http://svn.gna.org/viewcvs/relax?rev=21591&view=rev
Log:
The relax_disp.plot_disp_curves user function can now handle values of NaN.

These are simply replaced by 0.0 to allow Grace to open the file.


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=21591&r1=21590&r2=21591&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp/disp_data.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp/disp_data.py Thu Nov 21 
22:45:18 2013
@@ -1287,6 +1287,14 @@
                 axis_labels.append(['\\qCPMG pulse train frequency (Hz)\\Q', 
'%s - \\qR\\s2,eff\\N\\Q (rad.s\\S-1\\N)'%exp_type])
             else:
                 axis_labels.append(['\\qSpin-lock field strength (Hz)\\Q', 
'\\qR\\s1\\xr\\B\\N\\Q (rad.s\\S-1\\N)'])
+
+        # Remove all NaN values.
+        for i in range(len(data)):
+            for j in range(len(data[i])):
+                for k in range(len(data[i][j])):
+                    for l in range(len(data[i][j][k])):
+                        if isNaN(data[i][j][k][l]):
+                            data[i][j][k][l] = 0.0
 
         # Write the header.
         title = "Relaxation dispersion plot"




Related Messages


Powered by MHonArc, Updated Thu Nov 21 23:00:03 2013