Author: bugman
Date: Thu Aug 21 17:27:39 2014
New Revision: 25179
URL: http://svn.gna.org/viewcvs/relax?rev=25179&view=rev
Log:
Merged revisions 25175-25176 via svnmerge from
svn+ssh://[email protected]/svn/relax/trunk
........
r25175 | bugman | 2014-08-21 17:05:48 +0200 (Thu, 21 Aug 2014) | 6 lines
Added the R1 parameter fitting GUI element to the dispersion GUI tab.
This is a simple Boolean toggle element that allows the R1 optimisation to be
turned on. The value
is passed into the auto-analysis.
........
r25176 | bugman | 2014-08-21 17:07:04 +0200 (Thu, 21 Aug 2014) | 6 lines
Added the r1_fit argument to the relaxation dispersion auto-analysis.
When this is True, the relax_disp.r1_fit user function will be called to turn
R1 parameter fitting
on.
........
Modified:
branches/frame_order_cleanup/ (props changed)
branches/frame_order_cleanup/auto_analyses/relax_disp.py
branches/frame_order_cleanup/gui/analyses/auto_relax_disp.py
Propchange: branches/frame_order_cleanup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Aug 21 17:27:39 2014
@@ -1 +1 @@
-/trunk:1-25173
+/trunk:1-25173,25175-25176
Modified: branches/frame_order_cleanup/auto_analyses/relax_disp.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/auto_analyses/relax_disp.py?rev=25179&r1=25178&r2=25179&view=diff
==============================================================================
--- branches/frame_order_cleanup/auto_analyses/relax_disp.py (original)
+++ branches/frame_order_cleanup/auto_analyses/relax_disp.py Thu Aug 21
17:27:39 2014
@@ -51,7 +51,7 @@
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, exp_mc_sim_num=None,
modsel='AIC', pre_run_dir=None, optimise_r2eff=False, insignificance=0.0,
numeric_only=False, mc_sim_all_models=False, eliminate=True,
set_grid_r20=False):
+ def __init__(self, pipe_name=None, pipe_bundle=None, results_dir=None,
models=[MODEL_R2EFF], grid_inc=11, mc_sim_num=500, exp_mc_sim_num=None,
modsel='AIC', pre_run_dir=None, optimise_r2eff=False, insignificance=0.0,
numeric_only=False, mc_sim_all_models=False, eliminate=True,
set_grid_r20=False, r1_fit=False):
"""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.
@@ -84,6 +84,7 @@
@type eliminate: bool
@keyword set_grid_r20: A flag which if True will set the
grid R20 values from the minimum R2eff values through the r20_from_min_r2eff
user function. This will speed up the grid search with a factor
GRID_INC^(Nr_spec_freq). For a CPMG experiment with two fields and standard
GRID_INC=21, the speed-up is a factor 441.
@type set_grid_r20: bool
+ @keyword r1_fit: A flag which if True will activate
R1 parameter fitting via relax_disp.r1_fit for the models that support it. If
False, then the relax_disp.r1_fit user function will not be called.
"""
# Printout.
@@ -112,6 +113,7 @@
self.numeric_only = numeric_only
self.mc_sim_all_models = mc_sim_all_models
self.eliminate = eliminate
+ self.r1_fit = r1_fit
# No results directory, so default to the current directory.
if not self.results_dir:
@@ -529,6 +531,11 @@
if MODEL_R2EFF in self.models:
self.error_analysis()
+ # R1 parameter fitting.
+ if self.r1_fit:
+ subtitle(file=sys.stdout, text="R1 parameter optimisation
activation", prespace=3)
+ self.interpreter.relax_disp.r1_fit(fit=self.r1_fit)
+
# Loop over the models.
self.model_pipes = []
for model in self.models:
Modified: branches/frame_order_cleanup/gui/analyses/auto_relax_disp.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/gui/analyses/auto_relax_disp.py?rev=25179&r1=25178&r2=25179&view=diff
==============================================================================
--- branches/frame_order_cleanup/gui/analyses/auto_relax_disp.py
(original)
+++ branches/frame_order_cleanup/gui/analyses/auto_relax_disp.py Thu Aug
21 17:27:39 2014
@@ -114,6 +114,7 @@
ds.relax_gui.analyses[data_index].pipe_bundle = pipe_bundle
# Initialise the variables.
+ ds.relax_gui.analyses[data_index].r1_fit = False
ds.relax_gui.analyses[data_index].numeric_only = False
ds.relax_gui.analyses[data_index].grid_inc = None
ds.relax_gui.analyses[data_index].mc_sim_num = None
@@ -286,6 +287,9 @@
if model != MODEL_NOREX and model in MODEL_LIST_R1RHO and not
has_r1rho_exp_type():
model_mismatch.append([model, 'R1rho'])
+ # The R1 parameter fitting flag.
+ data.r1_fit = self.r1_fit.GetValue()
+
# The numeric only solution.
data.numeric_only = self.numeric_only.GetValue()
@@ -352,6 +356,10 @@
# Add the dispersion models GUI element, with spacing.
self.model_field = Disp_model_list(self, box)
self.model_field.set_value(self.data.disp_models)
+
+ # R1 parameter optimisation.
+ tooltip = "Toggle the optimisation of the off-resonance R1
parameter.\n\nThis allows the optimisation of R1 values to be turned on an off
for the relaxation dispersion dispersion models. If turned off, the current
values of R1 will be fixed. Otherwise the R1 values will be added to the model
parameter set. For models which do not support the R1 parameter for
off-resonance effects, this setting will have no effect."
+ self.r1_fit = Boolean_ctrl(box, self, text="R1 parameter
optimisation:", default=False, tooltip=tooltip, width_text=self.width_text,
width_button=self.width_button, spacer=self.spacer_horizontal)
# The numeric only solution.
tooltip = "The class of models to use in the final model
selection.\n\nThe default of False allows all dispersion models to be compared
for statistical significance in the analysis (no exchange, the analytic models
and the numeric models). The value of True will activate a pure numeric
solution - the analytic models will be optimised, as they are very useful for
replacing the grid search for the numeric models, but the final model selection
will not include them."
@@ -596,6 +604,12 @@
@keyword upload: A flag which if True will cause the frame to send
data to the relax data store. If False, data will be downloaded from the relax
data store to update the frame.
@type upload: bool
"""
+
+ # The R1 parameter fitting flag.
+ if upload:
+ self.data.r1_fit = self.r1_fit.GetValue()
+ elif hasattr(self.data, 'r1_fit'):
+ self.r1_fit.SetValue(bool(self.data.r1_fit))
# The numeric solution only flag.
if upload:
@@ -699,7 +713,7 @@
Relax_disp.opt_max_iterations = self.data.opt_max_iterations
# Execute.
- Relax_disp(pipe_name=self.data.pipe_name,
pipe_bundle=self.data.pipe_bundle, results_dir=self.data.save_dir,
models=self.data.models, grid_inc=self.data.inc,
mc_sim_num=self.data.mc_sim_num, pre_run_dir=self.data.pre_run_dir,
mc_sim_all_models=self.data.mc_sim_all_models,
insignificance=self.data.insignificance, numeric_only=self.data.numeric_only)
+ Relax_disp(pipe_name=self.data.pipe_name,
pipe_bundle=self.data.pipe_bundle, results_dir=self.data.save_dir,
models=self.data.models, grid_inc=self.data.inc,
mc_sim_num=self.data.mc_sim_num, pre_run_dir=self.data.pre_run_dir,
mc_sim_all_models=self.data.mc_sim_all_models,
insignificance=self.data.insignificance, numeric_only=self.data.numeric_only,
r1_fit=self.data.r1_fit)
# Alias the relax data store data.
data = ds.relax_gui.analyses[self.data_index]
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits