mailr19739 - in /branches/relax_disp: auto_analyses/relax_disp.py gui/components/spectrum.py


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

Header


Content

Posted by edward on May 24, 2013 - 17:52:
Author: bugman
Date: Fri May 24 17:52:58 2013
New Revision: 19739

URL: http://svn.gna.org/viewcvs/relax?rev=19739&view=rev
Log:
More fixes to the relax_disp branch for the changes of the 
spectrometer.frequency user function.


Modified:
    branches/relax_disp/auto_analyses/relax_disp.py
    branches/relax_disp/gui/components/spectrum.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=19739&r1=19738&r2=19739&view=diff
==============================================================================
--- branches/relax_disp/auto_analyses/relax_disp.py (original)
+++ branches/relax_disp/auto_analyses/relax_disp.py Fri May 24 17:52:58 2013
@@ -108,9 +108,8 @@
 
         # The number of spectrometer field strengths.
         frqs = [None]
-        if hasattr(cdp, 'frq'):
-            frqs = unique_elements(cdp.frq.values())
-            frqs.sort()
+        if hasattr(cdp, 'spectrometer_frq_list'):
+            frqs = cdp.spectrometer_frq_list
 
         # Dispersion points.
         if cdp.exp_type in CPMG_EXP:
@@ -132,7 +131,7 @@
                 for id in cdp.spectrum_ids:
                     # Check that the spectrometer frequency matches.
                     match_frq = True
-                    if frq != None and cdp.frq[id] != frq:
+                    if frq != None and cdp.spectrometer_frq[id] != frq:
                         match_frq = False
 
                     # Check that the dispersion point matches.

Modified: branches/relax_disp/gui/components/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/components/spectrum.py?rev=19739&r1=19738&r2=19739&view=diff
==============================================================================
--- branches/relax_disp/gui/components/spectrum.py (original)
+++ branches/relax_disp/gui/components/spectrum.py Fri May 24 17:52:58 2013
@@ -100,8 +100,8 @@
 
         # The current time.
         frq = None
-        if hasattr(cdp, 'frq') and id in cdp.frq.keys():
-            frq = cdp.frq[id]
+        if hasattr(cdp, 'spectrometer_frq') and id in cdp.spectrometer_frq:
+            frq = cdp.spectrometer_frq[id]
 
         # Launch the dialog.
         if frq == None:
@@ -304,7 +304,7 @@
         """
 
         # No type info.
-        if not hasattr(cdp, 'frq') or not len(cdp.frq):
+        if not hasattr(cdp, 'spectrometer_frq') or not 
len(cdp.spectrometer_frq):
             return False
 
         # Append a column.
@@ -313,11 +313,11 @@
         # Set the values.
         for i in range(len(cdp.spectrum_ids)):
             # No value.
-            if cdp.spectrum_ids[i] not in cdp.frq.keys():
+            if cdp.spectrum_ids[i] not in cdp.spectrometer_frq:
                 continue
 
             # Set the value (in MHz).
-            self.element.SetStringItem(i, index, 
float_to_gui(cdp.frq[cdp.spectrum_ids[i]]/1e6))
+            self.element.SetStringItem(i, index, 
float_to_gui(cdp.spectrometer_frq[cdp.spectrum_ids[i]]/1e6))
 
         # Successful.
         return True




Related Messages


Powered by MHonArc, Updated Fri May 24 18:00:02 2013