Package specific_analyses :: Package relax_fit :: Module parameter_object
[hide private]
[frames] | no frames]

Source Code for Module specific_analyses.relax_fit.parameter_object

 1  ############################################################################### 
 2  #                                                                             # 
 3  # Copyright (C) 2004-2014 Edward d'Auvergne                                   # 
 4  #                                                                             # 
 5  # This file is part of the program relax (http://www.nmr-relax.com).          # 
 6  #                                                                             # 
 7  # This program is free software: you can redistribute it and/or modify        # 
 8  # it under the terms of the GNU General Public License as published by        # 
 9  # the Free Software Foundation, either version 3 of the License, or           # 
10  # (at your option) any later version.                                         # 
11  #                                                                             # 
12  # This program is distributed in the hope that it will be useful,             # 
13  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
15  # GNU General Public License for more details.                                # 
16  #                                                                             # 
17  # You should have received a copy of the GNU General Public License           # 
18  # along with this program.  If not, see <http://www.gnu.org/licenses/>.       # 
19  #                                                                             # 
20  ############################################################################### 
21   
22  # Module docstring. 
23  """The module for the relaxation curve fitting parameter list object.""" 
24   
25  # relax module imports. 
26  from specific_analyses.parameter_object import Param_list 
27   
28   
29 -class Relax_fit_params(Param_list):
30 """The relaxation curve fitting parameter list singleton.""" 31 32 # Class variable for storing the class instance (for the singleton design pattern). 33 _instance = None 34
35 - def __init__(self):
36 """Define all the parameters of the analysis.""" 37 38 # The object is already initialised. 39 if self._initialised: return 40 41 # Execute the base class __init__() method. 42 Param_list.__init__(self) 43 44 # Add the base data. 45 self._add_peak_intensity() 46 47 # Add the base information for the analysis. 48 self._add('relax_times', scope='spin', py_type=dict, grace_string='\\qRelaxation time period (s)\\Q') 49 50 # Add the model variables. 51 self._add_model_info(model_flag=False) 52 53 # Add the model parameters. 54 self._add('rx', scope='spin', default=8.0, desc='Either the R1 or R2 relaxation rate', set='params', py_type=float, grace_string='\\qR\\sx\\Q', err=True, sim=True) 55 self._add('i0', scope='spin', default=10000.0, desc='The initial intensity', py_type=float, set='params', grace_string='\\qI\\s0\\Q', err=True, sim=True) 56 self._add('iinf', scope='spin', default=0.0, desc='The intensity at infinity', py_type=float, set='params', grace_string='\\qI\\sinf\\Q', err=True, sim=True) 57 58 # Add the minimisation data. 59 self._add_min_data(min_stats_global=False, min_stats_spin=True) 60 61 # Set up the user function documentation. 62 self._set_uf_title("Relaxation curve fitting parameters") 63 self._uf_param_table(label="table: curve-fit parameters", caption="Relaxation curve fitting parameters.") 64 self._uf_param_table(label="table: curve-fit parameters and min stats", caption="Relaxation curve fitting parameters and minimisation statistics.", sets=['params', 'fixed', 'min']) 65 self._uf_param_table(label="table: curve-fit parameter value setting", caption="Relaxation curve fitting parameters.") 66 self._uf_param_table(label="table: curve-fit parameter value setting with defaults", caption="Relaxation curve fitting parameter value setting.", default=True)
67