mailr12770 - /branches/relax_data/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 March 03, 2011 - 12:04:
Author: bugman
Date: Thu Mar  3 12:04:33 2011
New Revision: 12770

URL: http://svn.gna.org/viewcvs/relax?rev=12770&view=rev
Log:
Deleted the unused relaxation data update_data_structures_spin() function.


Modified:
    branches/relax_data/generic_fns/relax_data.py

Modified: branches/relax_data/generic_fns/relax_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_data/generic_fns/relax_data.py?rev=12770&r1=12769&r2=12770&view=diff
==============================================================================
--- branches/relax_data/generic_fns/relax_data.py (original)
+++ branches/relax_data/generic_fns/relax_data.py Thu Mar  3 12:04:33 2011
@@ -878,92 +878,6 @@
     cdp.exp_info.temp_control_setup(ri_id, method)
 
 
-def update_data_structures_spin(spin=None, ri_label=None, frq_label=None, 
frq=None, value=None, error=None):
-    """Update all relaxation data structures of the given spin container.
-
-    @param spin:            The SpinContainer object.
-    @type spin:             class instance
-    @param ri_label:        The relaxation data type, ie 'R1', 'R2', or 
'NOE'.
-    @type ri_label:         str
-    @param frq_label:       The field strength label.
-    @type frq_label:        str
-    @param frq:             The spectrometer proton frequency in Hz.
-    @type frq:              float
-    @param value:           The relaxation data value.
-    @type value:            float
-    @param error:           The relaxation data error.
-    @type error:            float
-    """
-
-    # Initialise the relaxation data structures (if needed).
-    data_init(spin, global_flag=False)
-
-    # Find the index corresponding to 'ri_label' and 'frq_label'.
-    index = find_ri_index(spin, ri_label, frq_label)
-
-    # Append empty data.
-    if index == None:
-        spin.relax_data.append(None)
-        spin.relax_error.append(None)
-        spin.ri_labels.append(None)
-        spin.remap_table.append(None)
-        spin.noe_r1_table.append(None)
-
-    # Set the index value.
-    if index == None:
-        i = len(spin.relax_data) - 1
-    else:
-        i = index
-
-    # Relaxation data and errors.
-    spin.relax_data[i] = value
-    spin.relax_error[i] = error
-
-    # Update the number of relaxation data points.
-    if index == None:
-        spin.num_ri = spin.num_ri + 1
-
-    # Add ri_label to the data types.
-    spin.ri_labels[i] = ri_label
-
-    # Find if the frequency frq has already been loaded.
-    remap = len(spin.frq)
-    flag = 0
-    for j in xrange(len(spin.frq)):
-        if frq == spin.frq[j]:
-            remap = j
-            flag = 1
-
-    # Update the remap table.
-    spin.remap_table[i] = remap
-
-    # Update the data structures which have a length equal to the number of 
field strengths.
-    if not flag:
-        # Update the number of frequencies.
-        if index == None:
-            spin.num_frq = spin.num_frq + 1
-
-        # Update the frequency labels.
-        spin.frq_labels.append(frq_label)
-
-        # Update the frequency array.
-        spin.frq.append(frq)
-
-    # Update the NOE R1 translation table.
-    # If the data corresponds to 'NOE', try to find if the corresponding R1 
data.
-    if ri_label == 'NOE':
-        for j in xrange(spin.num_ri):
-            if spin.ri_labels[j] == 'R1' and frq_label == 
spin.frq_labels[spin.remap_table[j]]:
-                spin.noe_r1_table[spin.num_ri - 1] = j
-
-    # Update the NOE R1 translation table.
-    # If the data corresponds to 'R1', try to find if the corresponding NOE 
data.
-    if ri_label == 'R1':
-        for j in xrange(spin.num_ri):
-            if spin.ri_labels[j] == 'NOE' and frq_label == 
spin.frq_labels[spin.remap_table[j]]:
-                spin.noe_r1_table[j] = spin.num_ri - 1
-
-
 def write(ri_id=None, file=None, dir=None, force=False):
     """Write relaxation data to a file.
 




Related Messages


Powered by MHonArc, Updated Thu Mar 03 12:20:02 2011