mailr4844 - in /1.3/sample_scripts: relax_curve_diff.py remap.py


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

Header


Content

Posted by sebastien . morin . 1 on January 17, 2008 - 22:04:
Author: semor
Date: Thu Jan 17 22:04:34 2008
New Revision: 4844

URL: http://svn.gna.org/viewcvs/relax?rev=4844&view=rev
Log:
Converted some sample scripts from Numeric to numpy.


Modified:
    1.3/sample_scripts/relax_curve_diff.py
    1.3/sample_scripts/remap.py

Modified: 1.3/sample_scripts/relax_curve_diff.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/sample_scripts/relax_curve_diff.py?rev=4844&r1=4843&r2=4844&view=diff
==============================================================================
--- 1.3/sample_scripts/relax_curve_diff.py (original)
+++ 1.3/sample_scripts/relax_curve_diff.py Thu Jan 17 22:04:34 2008
@@ -23,7 +23,7 @@
 
 
 # Python module imports.
-from Numeric import Float64, array, identity, sqrt, zeros
+from numpy import float64, array, identity, sqrt, zeros
 
 # relax module imports.
 from data import Data as relax_data_store
@@ -46,10 +46,10 @@
             continue
 
         # The parameter vector.
-        param_vector = array([spin.rx, spin.i0], Float64)
+        param_vector = array([spin.rx, spin.i0], float64)
 
         # Initialise the relaxation fit functions.
-        setup(num_params=len(spin.params), 
num_times=len(relax_data_store.relax_times[name]), 
values=spin.ave_intensities, sd=relax_data_store.sd[name], 
relax_times=relax_data_store.relax_times[name], scaling_matrix=identity(2, 
Float64))
+        setup(num_params=len(spin.params), 
num_times=len(relax_data_store.relax_times[name]), 
values=spin.ave_intensities, sd=relax_data_store.sd[name], 
relax_times=relax_data_store.relax_times[name], scaling_matrix=identity(2, 
float64))
 
         # Make a single function call.  This will cause back calculation and 
the data will be stored in the C module.
         func(param_vector)
@@ -72,8 +72,8 @@
     """
 
     # Diff array, std deviation array, and number of spins.
-    diff_array = zeros(sum(relax_data_store.num_spectra[name]), Float64)
-    sd_array = zeros(sum(relax_data_store.num_spectra[name]), Float64)
+    diff_array = zeros(sum(relax_data_store.num_spectra[name]), float64)
+    sd_array = zeros(sum(relax_data_store.num_spectra[name]), float64)
     num_spins = 0
 
 

Modified: 1.3/sample_scripts/remap.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/sample_scripts/remap.py?rev=4844&r1=4843&r2=4844&view=diff
==============================================================================
--- 1.3/sample_scripts/remap.py (original)
+++ 1.3/sample_scripts/remap.py Thu Jan 17 22:04:34 2008
@@ -1,7 +1,7 @@
 # Script for mapping the model-free space.
 
 # Python module imports.
-from Numeric import Float64, array
+from numpy import float64, array
 
 
 def remap(values):
@@ -19,7 +19,7 @@
     # ts.
     ts = values[2]
 
-    return array([s2f, s2s, ts], Float64)
+    return array([s2f, s2s, ts], float64)
 
 
 # Set the run name (also the name of a preset model-free model).




Related Messages


Powered by MHonArc, Updated Thu Jan 17 22:20:11 2008