mailr19900 - in /branches/relax_disp: auto_analyses/ specific_analyses/relax_disp/ user_functions/


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

Header


Content

Posted by edward on June 06, 2013 - 18:26:
Author: bugman
Date: Thu Jun  6 18:26:24 2013
New Revision: 19900

URL: http://svn.gna.org/viewcvs/relax?rev=19900&view=rev
Log:
Reverted r19753 and r19754 - the relax_disp.r2eff_setup user function is now 
useless.

The command used was:
svn merge -r19754:r19752 .

Manual editing was required to fix a number of conflicts.  The user function 
is not necessary as the
errors are now directly calculated rather than simulated using bootstrapping.

.....
  r19754 | bugman | 2013-05-28 11:41:25 +0200 (Tue, 28 May 2013) | 6 lines
  Changed paths:
     M /branches/relax_disp/auto_analyses/relax_disp.py
  
  The relaxation dispersion auto-analysis now handles the Bootstrapping 
simulations.
  
  The bootstrap_sim_num argument can now be passed into the auto-analysis, 
and the run() method then
  executes the relax_disp.r2eff_setup user function.
  
  
  ------------------------------------------------------------------------
  r19753 | bugman | 2013-05-28 11:37:19 +0200 (Tue, 28 May 2013) | 6 lines
  Changed paths:
     M /branches/relax_disp/specific_analyses/relax_disp/__init__.py
     M /branches/relax_disp/user_functions/relax_disp.py
  
  Created the relax_disp.r2eff_setup user function.
  
  This is required to set the number of Bootstrapping simulations to use in 
the calc user function.
  It replaces the hardcoded variable.
.....


Modified:
    branches/relax_disp/auto_analyses/relax_disp.py
    branches/relax_disp/specific_analyses/relax_disp/__init__.py
    branches/relax_disp/user_functions/relax_disp.py

Modified: branches/relax_disp/auto_analyses/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/auto_analyses/relax_disp.py?rev=19900&r1=19899&r2=19900&view=diff
==============================================================================
--- branches/relax_disp/auto_analyses/relax_disp.py (original)
+++ branches/relax_disp/auto_analyses/relax_disp.py Thu Jun  6 18:26:24 2013
@@ -45,25 +45,23 @@
     opt_func_tol = 1e-25
     opt_max_iterations = int(1e7)
 
-    def __init__(self, pipe_name=None, pipe_bundle=None, results_dir=None, 
models=[MODEL_R2EFF], grid_inc=11, mc_sim_num=500, bootstrap_sim_num=100000, 
modsel='AIC'):
+    def __init__(self, pipe_name=None, pipe_bundle=None, results_dir=None, 
models=[MODEL_R2EFF], grid_inc=11, mc_sim_num=500, modsel='AIC'):
         """Perform a full relaxation dispersion analysis for the given list 
of models.
 
-        @keyword pipe_name:         The name of the data pipe containing all 
of the data for the analysis.
-        @type pipe_name:            str
-        @keyword pipe_bundle:       The data pipe bundle to associate all 
spawned data pipes with.
-        @type pipe_bundle:          str
-        @keyword results_dir:       The directory where results files are 
saved.
-        @type results_dir:          str
-        @keyword models:            The list of relaxation dispersion models 
to optimise.
-        @type models:               list of str
-        @keyword grid_inc:          Number of grid search increments.
-        @type grid_inc:             int
-        @keyword mc_sim_num:        The number of Monte Carlo simulations to 
be used for error analysis at the end of the analysis.
-        @type mc_sim_num:           int
-        @keyword bootstrap_sim_num: The number of Monte Carlo simulations to 
be used for error analysis at the end of the analysis.
-        @type bootstrap_sim_num:    int
-        @keyword modsel:            The model selection technique to use in 
the analysis to determine which model is the best for each spin cluster.  
This can currently be one of 'AIC', 'AICc', and 'BIC'.
-        @type modsel:               str
+        @keyword pipe_name:     The name of the data pipe containing all of 
the data for the analysis.
+        @type pipe_name:        str
+        @keyword pipe_bundle:   The data pipe bundle to associate all 
spawned data pipes with.
+        @type pipe_bundle:      str
+        @keyword results_dir:   The directory where results files are saved.
+        @type results_dir:      str
+        @keyword models:        The list of relaxation dispersion models to 
optimise.
+        @type models:           list of str
+        @keyword grid_inc:      Number of grid search increments.
+        @type grid_inc:         int
+        @keyword mc_sim_num:    The number of Monte Carlo simulations to be 
used for error analysis at the end of the analysis.
+        @type mc_sim_num:       int
+        @keyword modsel:        The model selection technique to use in the 
analysis to determine which model is the best for each spin cluster.  This 
can currently be one of 'AIC', 'AICc', and 'BIC'.
+        @type modsel:           str
         """
 
         # Printout.
@@ -83,7 +81,6 @@
         self.models = models
         self.grid_inc = grid_inc
         self.mc_sim_num = mc_sim_num
-        self.bootstrap_sim_num = bootstrap_sim_num
         self.modsel = modsel
 
         # No results directory, so default to the current directory.
@@ -188,10 +185,6 @@
 
             # Calculate the R2eff values for the fixed relaxation time 
period data types.
             if model == MODEL_R2EFF and cdp.exp_type in FIXED_TIME_EXP:
-                # Set up the simulation number.
-                
self.interpreter.relax_disp.r2eff_setup(sim_num=self.bootstrap_sim_num)
-
-                # Calculate the values.
                 self.interpreter.calc()
 
             # Optimise the model.

Modified: branches/relax_disp/specific_analyses/relax_disp/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/__init__.py?rev=19900&r1=19899&r2=19900&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp/__init__.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp/__init__.py Thu Jun  6 
18:26:24 2013
@@ -776,17 +776,6 @@
         add_result_file(type='grace', label='Grace', file=file_path)
 
 
-    def _r2eff_setup(self, sim_num=100000):
-        """Setup the R2eff/R1rho model.
-
-        @keyword sim_num:   The number of Bootstrapping simulations for 
error propagation for the fixed relaxation time period experiments.
-        @type sim_num:      int
-        """
-
-        # Set the value.
-        cdp.bootstrap_sim_num = sim_num
-
-
     def _select_model(self, model=MODEL_R2EFF):
         """Set up the model for the relaxation dispersion analysis.
 
@@ -958,13 +947,8 @@
         if cdp.exp_type not in FIXED_TIME_EXP:
             raise RelaxError("The experiment '%s' is not of the fixed 
relaxation time period data type, the R2eff/R1rho values cannot be directly 
calculated." % cdp.exp_type)
 
-        # Check the simulation number.
-        if not hasattr(cdp, 'bootstrap_sim_num'):
-            raise RelaxError("The Bootstrapping simulation number has not 
been specified, please use the R2eff/R1rho setup user function first.")
-
         # Printouts.
         print("Calculating the R2eff/R1rho values for fixed relaxation time 
period data.")
-        print("Error propagation using Bootstrapping with %i simulations." % 
cdp.bootstrap_sim_num)
 
         # Loop over the spins.
         for spin, spin_id in spin_loop(return_id=True, skip_desel=True):

Modified: branches/relax_disp/user_functions/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/user_functions/relax_disp.py?rev=19900&r1=19899&r2=19900&view=diff
==============================================================================
--- branches/relax_disp/user_functions/relax_disp.py (original)
+++ branches/relax_disp/user_functions/relax_disp.py Thu Jun  6 18:26:24 2013
@@ -393,30 +393,6 @@
 uf.wizard_image = WIZARD_IMAGE_PATH + 'grace.png'
 
 
-# The relax_disp.r2eff_setup user function.
-uf = uf_info.add_uf('relax_disp.r2eff_setup')
-uf.title = "Setup for the R2eff/R1rho model."
-uf.title_short = "R2eff/R1rho model setup."
-uf.add_keyarg(
-    name = "sim_num",
-    default = 100000,
-    min = 3,
-    max = 1000000000,
-    py_type = "int",
-    desc_short = "Bootstrapping simulation number",
-    desc = "The number of Bootstrapping simulations for error propagation."
-)
-# Description.
-uf.desc.append(Desc_container())
-uf.desc[-1].add_paragraph("This is used to setup the variables required for 
the calculation of the R2eff/R1rho values.  Currently only the number of 
Bootstrapping simulations for error propagation needs to be given.  This is 
only required for calculating the R2eff/R1rho values for fixed relaxation 
time period data, if full relaxation curves have been collected then this 
value will be ignored.")
-uf.backend = relax_disp_obj._r2eff_setup
-uf.menu_text = "&r2eff_setup"
-uf.gui_icon = "oxygen.actions.edit-rename"
-uf.wizard_size = (800, 500)
-uf.wizard_image = ANALYSIS_IMAGE_PATH + 'relax_disp_200x200.png'
-uf.wizard_apply_button = False
-
-
 # The relax_disp.relax_time user function.
 uf = uf_info.add_uf('relax_disp.relax_time')
 uf.title = "Set the relaxation delay time associated with each spectrum."




Related Messages


Powered by MHonArc, Updated Thu Jun 06 18:40:01 2013