mailr19780 - /branches/relax_disp/specific_analyses/relax_disp/__init__.py


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

Header


Content

Posted by edward on May 30, 2013 - 11:10:
Author: bugman
Date: Thu May 30 11:10:54 2013
New Revision: 19780

URL: http://svn.gna.org/viewcvs/relax?rev=19780&view=rev
Log:
Fixes for the backend of the relax_disp.plot_exp_curves user function.

This code needed to be updated for the major changes in the relax_disp branch.


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

Modified: branches/relax_disp/specific_analyses/relax_disp/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/__init__.py?rev=19780&r1=19779&r2=19780&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp/__init__.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp/__init__.py Thu May 30 
11:10:54 2013
@@ -725,6 +725,10 @@
 
                 # Loop over each spin.
                 for spin, id in spin_loop(return_id=True, skip_desel=True):
+                    # No data present.
+                    if not hasattr(spin, 'intensities'):
+                        continue
+
                     # Append a new set structure and set the name to the 
spin ID.
                     data[graph_index].append([])
                     if graph_index == 0:
@@ -733,14 +737,20 @@
                     # Loop over the relaxation time periods.
                     for time in cdp.relax_time_list:
                         # The key.
-                        key = intensity_key(exp_key=disp_point, 
relax_time=time)
-
-                        # Add the data.
-                        if hasattr(spin, 'intensity_err'):
-                            data[graph_index][-1].append([time, 
spin.intensities[key], spin.intensity_err[key]])
-                            err = True
-                        else:
-                            data[graph_index][-1].append([time, 
spin.intensities[key]])
+                        keys = find_intensity_keys(frq=frq, 
point=disp_point, time=time)
+
+                        # Loop over each key.
+                        for key in keys:
+                            # No key present.
+                            if key not in spin.intensities:
+                                continue
+
+                            # Add the data.
+                            if hasattr(spin, 'intensity_err'):
+                                data[graph_index][-1].append([time, 
spin.intensities[key], spin.intensity_err[key]])
+                                err = True
+                            else:
+                                data[graph_index][-1].append([time, 
spin.intensities[key]])
 
                 # Increment the frq index.
                 graph_index += 1




Related Messages


Powered by MHonArc, Updated Thu May 30 11:20:02 2013