mailr16723 - /branches/uf_redesign/generic_fns/relax_data.py


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

Header


Content

Posted by edward on June 07, 2012 - 14:53:
Author: bugman
Date: Thu Jun  7 14:53:17 2012
New Revision: 16723

URL: http://svn.gna.org/viewcvs/relax?rev=16723&view=rev
Log:
The relax_data.delete user function now removes all of the metadata 
associated with the ID.


Modified:
    branches/uf_redesign/generic_fns/relax_data.py

Modified: branches/uf_redesign/generic_fns/relax_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/generic_fns/relax_data.py?rev=16723&r1=16722&r2=16723&view=diff
==============================================================================
--- branches/uf_redesign/generic_fns/relax_data.py (original)
+++ branches/uf_redesign/generic_fns/relax_data.py Thu Jun  7 14:53:17 2012
@@ -512,6 +512,20 @@
             del spin.ri_data
         if hasattr(spin, 'ri_data_err') and len(spin.ri_data_err) == 0:
             del spin.ri_data_err
+
+    # Delete the metadata.
+    if hasattr(cdp, 'exp_info') and hasattr(cdp.exp_info, 
'temp_calibration') and cdp.exp_info.temp_calibration.has_key(ri_id):
+        del cdp.exp_info.temp_calibration[ri_id]
+        if len(cdp.exp_info.temp_calibration) == 0:
+            del cdp.exp_info.temp_calibration
+    if hasattr(cdp, 'exp_info') and hasattr(cdp.exp_info, 'temp_control') 
and cdp.exp_info.temp_control.has_key(ri_id):
+        del cdp.exp_info.temp_control[ri_id]
+        if len(cdp.exp_info.temp_control) == 0:
+            del cdp.exp_info.temp_control
+    if hasattr(cdp, 'exp_info') and hasattr(cdp.exp_info, 
'peak_intensity_type') and cdp.exp_info.peak_intensity_type.has_key(ri_id):
+        del cdp.exp_info.peak_intensity_type[ri_id]
+        if len(cdp.exp_info.peak_intensity_type) == 0:
+            del cdp.exp_info.peak_intensity_type
 
 
 def display(ri_id=None):




Related Messages


Powered by MHonArc, Updated Thu Jun 07 15:40:02 2012