mailr5800 - /1.3/generic_fns/palmer.py


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

Header


Content

Posted by edward on April 16, 2008 - 21:52:
Author: bugman
Date: Wed Apr 16 21:52:13 2008
New Revision: 5800

URL: http://svn.gna.org/viewcvs/relax?rev=5800&view=rev
Log:
Removed all references to 'self' in the extract() function.


Modified:
    1.3/generic_fns/palmer.py

Modified: 1.3/generic_fns/palmer.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/palmer.py?rev=5800&r1=5799&r2=5800&view=diff
==============================================================================
--- 1.3/generic_fns/palmer.py (original)
+++ 1.3/generic_fns/palmer.py Wed Apr 16 21:52:13 2008
@@ -485,13 +485,16 @@
 
 
 def extract(dir, spin_id=None):
-    """Function for extracting the Modelfree4 results out of the 'mfout' 
file."""
+    """Extract the Modelfree4 results out of the 'mfout' file.
+
+    @param dir:         The directory containing the 'mfout' file.
+    @type dir:          str or None
+    @keyword spin_id:   The spin identification string.
+    @type spin_id:      str or None
+    """
 
     # Alias the current data pipe.
     cdp = relax_data_store[relax_data_store.current_pipe]
-
-    # Arguments.
-    self.pipe = pipe
 
     # Test if sequence data is loaded.
     if not exists_mol_res_spin_data():
@@ -509,17 +512,17 @@
 
     # Open the file.
     mfout_file = open(dir + "/mfout", 'r')
-    self.mfout_lines = mfout_file.readlines()
+    mfout_lines = mfout_file.readlines()
     mfout_file.close()
 
     # Get the section line positions of the mfout file.
-    self.line_positions()
+    line_positions()
 
     # Find out if simulations were carried out.
     sims = 0
-    for i in xrange(len(self.mfout_lines)):
-        if search('_iterations', self.mfout_lines[i]):
-            row = split(self.mfout_lines[i])
+    for i in xrange(len(mfout_lines)):
+        if search('_iterations', mfout_lines[i]):
+            row = split(mfout_lines[i])
             sims = int(row[1])
 
     # Loop over the sequence.
@@ -540,41 +543,41 @@
 
         # Get the S2 data.
         if 'S2' in spin.params:
-            spin.s2, spin.s2_err = self.get_mf_data(self.mfout_S2_pos + pos)
+            spin.s2, spin.s2_err = get_mf_data(mfout_S2_pos + pos)
 
         # Get the S2f data.
         if 'S2f' in spin.params or 'S2s' in spin.params:
-            spin.s2f, spin.s2f_err = self.get_mf_data(self.mfout_S2f_pos + 
pos)
+            spin.s2f, spin.s2f_err = get_mf_data(mfout_S2f_pos + pos)
 
         # Get the S2s data.
         if 'S2f' in spin.params or 'S2s' in spin.params:
-            spin.s2s, spin.s2s_err = self.get_mf_data(self.mfout_S2s_pos + 
pos)
+            spin.s2s, spin.s2s_err = get_mf_data(mfout_S2s_pos + pos)
 
         # Get the te data.
         if 'te' in spin.params:
-            spin.te, spin.te_err = self.get_mf_data(self.mfout_te_pos + pos)
+            spin.te, spin.te_err = get_mf_data(mfout_te_pos + pos)
             spin.te = spin.te / 1e12
             spin.te_err = spin.te_err / 1e12
 
         # Get the ts data.
         if 'ts' in spin.params:
-            spin.ts, spin.ts_err = self.get_mf_data(self.mfout_te_pos + pos)
+            spin.ts, spin.ts_err = get_mf_data(mfout_te_pos + pos)
             spin.ts = spin.ts / 1e12
             spin.ts_err = spin.ts_err / 1e12
 
         # Get the Rex data.
         if 'Rex' in spin.params:
-            spin.rex, spin.rex_err = self.get_mf_data(self.mfout_Rex_pos + 
pos)
+            spin.rex, spin.rex_err = get_mf_data(mfout_Rex_pos + pos)
             spin.rex = spin.rex / (2.0 * pi * spin.frq[0])**2
             spin.rex_err = spin.rex_err / (2.0 * pi * spin.frq[0])**2
 
         # Get the chi-squared data.
         if not sims:
-            row = split(self.mfout_lines[self.mfout_chi2_pos + pos])
+            row = split(mfout_lines[mfout_chi2_pos + pos])
             spin.chi2 = float(row[1])
         else:
             # The mfout chi2 position (with no sims) plus 2 (for the extra 
XML) plus the residue position times 22 (because of the simulated SSE rows).
-            row = split(self.mfout_lines[self.mfout_chi2_pos + 2 + 22*pos])
+            row = split(mfout_lines[mfout_chi2_pos + 2 + 22*pos])
             spin.chi2 = float(row[1])
 
         # Increment the residue position.




Related Messages


Powered by MHonArc, Updated Wed Apr 16 22:00:20 2008