mailr24699 - in /branches/zooming_grid_search/specific_analyses: relax_disp/parameter_object.py relax_fit/parameter_object.py


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

Header


Content

Posted by edward on July 24, 2014 - 11:26:
Author: bugman
Date: Thu Jul 24 11:26:51 2014
New Revision: 24699

URL: http://svn.gna.org/viewcvs/relax?rev=24699&view=rev
Log:
Modified the grid search upper bounds functions for the relaxation 
curve-fitting.

This is for both the exponential relaxation curve-fitting analysis and the 
same fitting in the
dispersion analysis.  The intensity values are doubled and then rounded to 
the next order.  This
ensures that I0 and Iinf will be within the grid bounds.  Hence the zooming 
grid search can be used
for these curves.


Modified:
    
branches/zooming_grid_search/specific_analyses/relax_disp/parameter_object.py
    
branches/zooming_grid_search/specific_analyses/relax_fit/parameter_object.py

Modified: 
branches/zooming_grid_search/specific_analyses/relax_disp/parameter_object.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/specific_analyses/relax_disp/parameter_object.py?rev=24699&r1=24698&r2=24699&view=diff
==============================================================================
--- 
branches/zooming_grid_search/specific_analyses/relax_disp/parameter_object.py 
      (original)
+++ 
branches/zooming_grid_search/specific_analyses/relax_disp/parameter_object.py 
      Thu Jul 24 11:26:51 2014
@@ -24,6 +24,7 @@
 """The module for the relaxation dispersion parameter list object."""
 
 # relax module imports.
+from lib.mathematics import round_to_next_order
 from pipe_control.mol_res_spin import return_spin
 from specific_analyses.parameter_object import Param_list
 from specific_analyses.relax_disp.variables import MODEL_LIST_MMQ, MODEL_M61B
@@ -121,8 +122,8 @@
         spin = return_spin(spin_ids[si])
         upper = max(upper, max(spin.peak_intensity.values()))
 
-    # Return the maximum.
-    return upper
+    # Multiply the value by 2.0 and then round up to the next order - this 
will be the upper bound.
+    return round_to_next_order(upper * 2.0)
 
 
 

Modified: 
branches/zooming_grid_search/specific_analyses/relax_fit/parameter_object.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/specific_analyses/relax_fit/parameter_object.py?rev=24699&r1=24698&r2=24699&view=diff
==============================================================================
--- 
branches/zooming_grid_search/specific_analyses/relax_fit/parameter_object.py  
      (original)
+++ 
branches/zooming_grid_search/specific_analyses/relax_fit/parameter_object.py  
      Thu Jul 24 11:26:51 2014
@@ -49,11 +49,8 @@
     return round_to_next_order(max(spin.peak_intensity.values()))
 
 
-def i0(incs=None, model_info=None):
-    """Find the average intensity of the first time point.
-
-    This is for the grid search upper bound for the I0 parameter.
-
+def i0_upper(incs=None, model_info=None):
+    """Find the upper bound for the I0 parameter.
 
     @keyword incs:          The number of grid search increments.
     @type incs:             int
@@ -66,18 +63,14 @@
     # Unpack the data.
     spin, spin_id = model_info
 
-    # Find the ID of the first time point.
-    min_time = min(cdp.relax_times.values())
-    for key in list(cdp.relax_times.keys()):
-        if cdp.relax_times[key] == min_time:
-            id = key
-            break
+    # Find the maximum intensity.
+    upper = max(spin.peak_intensity.values())
 
-    # Return the averaged value.
-    return average(spin.peak_intensity[id])
+    # Multiply the value by 2.0 and then round up to the next order - this 
will be the upper bound.
+    return round_to_next_order(upper * 2.0)
 
 
-def iinf(incs=None, model_info=None):
+def iinf_upper(incs=None, model_info=None):
     """Find the average intensity of the last time point.
 
     This is for the grid search upper bound for the Iinf parameter.
@@ -101,9 +94,11 @@
             id = key
             break
 
-    # Return the averaged value.
-    return average(spin.peak_intensity[id])
+    # The averaged value.
+    upper = average(spin.peak_intensity[id])
 
+    # Multiply the value by 2.0 and then round up to the next order - this 
will be the upper bound.
+    return round_to_next_order(upper * 2.0)
 
 
 
@@ -161,7 +156,7 @@
             set = 'params',
             scaling = i_scaling,
             grid_lower = 0.0,
-            grid_upper = i0,
+            grid_upper = i0_upper,
             grace_string = '\\qI\\s0\\Q',
             err = True,
             sim = True
@@ -175,7 +170,7 @@
             set = 'params',
             scaling = i_scaling,
             grid_lower = 0.0,
-            grid_upper = iinf,
+            grid_upper = iinf_upper,
             grace_string = '\\qI\\sinf\\Q',
             err = True,
             sim = True




Related Messages


Powered by MHonArc, Updated Thu Jul 24 12:00:03 2014