mailr9278 - /1.3/sample_scripts/full_analysis.py


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

Header


Content

Posted by edward on August 12, 2009 - 13:16:
Author: bugman
Date: Wed Aug 12 13:16:06 2009
New Revision: 9278

URL: http://svn.gna.org/viewcvs/relax?rev=9278&view=rev
Log:
Made the full_analysis.py script more compatible with non-Unix operating 
systems.


Modified:
    1.3/sample_scripts/full_analysis.py

Modified: 1.3/sample_scripts/full_analysis.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/sample_scripts/full_analysis.py?rev=9278&r1=9277&r2=9278&view=diff
==============================================================================
--- 1.3/sample_scripts/full_analysis.py (original)
+++ 1.3/sample_scripts/full_analysis.py Wed Aug 12 13:16:06 2009
@@ -140,7 +140,7 @@
 """
 
 # Python module imports.
-from os import getcwd, listdir
+from os import getcwd, listdir, sep
 from re import search
 from string import lower
 
@@ -217,7 +217,7 @@
 
         if DIFF_MODEL == 'local_tm':
             # Base directory to place files into.
-            self.base_dir = 'local_tm/'
+            self.base_dir = 'local_tm'+sep
 
             # Sequential optimisation of all model-free models (function 
must be modified to suit).
             self.multi_model(local_tm=True)
@@ -239,7 +239,7 @@
                 # Inital round of optimisation for diffusion models MII to 
MV.
                 if self.round == 0:
                     # Base directory to place files into.
-                    self.base_dir = DIFF_MODEL + '/init/'
+                    self.base_dir = DIFF_MODEL + sep+'init'+sep
 
                     # Run name.
                     name = DIFF_MODEL
@@ -288,7 +288,7 @@
                 # Normal round of optimisation for diffusion models MII to 
MV.
                 else:
                     # Base directory to place files into.
-                    self.base_dir = DIFF_MODEL + '/round_' + `self.round` + 
'/'
+                    self.base_dir = DIFF_MODEL + 
sep+'round_'+`self.round`+sep
 
                     # Load the optimised diffusion tensor from either the 
previous round.
                     self.load_tensor()
@@ -352,7 +352,7 @@
                 pipe.create(model, 'mf')
 
                 # Load the diffusion model results.
-                results.read(file='results', dir=model + '/round_' + 
`self.round` + '/opt')
+                results.read(file='results', dir=model + 
sep+'round_'+`self.round`+sep+'opt')
 
             # Model selection between MI to MV.
             self.model_selection(modsel_pipe='final', write_flag=False)
@@ -544,7 +544,7 @@
 
         # Get a list of all files in the directory model.  If no directory 
exists, set the round to 'init' or 0.
         try:
-            dir_list = listdir(getcwd() + '/' + model)
+            dir_list = listdir(getcwd()+sep+model)
         except:
             return 0
 
@@ -585,11 +585,11 @@
 
         # Load the optimised diffusion tensor from the initial round.
         if self.round == 1:
-            results.read('results', DIFF_MODEL + '/init')
+            results.read('results', DIFF_MODEL + sep+'init')
 
         # Load the optimised diffusion tensor from the previous round.
         else:
-            results.read('results', DIFF_MODEL + '/round_' + `self.round - 
1` + '/opt')
+            results.read('results', DIFF_MODEL + 
sep+'round_'+`self.round-1`+sep+'opt')
 
 
     def model_selection(self, modsel_pipe=None, dir=None, write_flag=True):




Related Messages


Powered by MHonArc, Updated Wed Aug 12 13:20:03 2009