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

Source Code for Module specific_analyses.jw_mapping.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 reduced spectral density mapping parameter list object.""" 
24   
25  # relax module imports. 
26  from lib.physical_constants import N15_CSA 
27  from specific_analyses.parameter_object import Param_list 
28   
29   
30 -class Jw_mapping_params(Param_list):
31 """The reduced spectral density mapping parameter list singleton.""" 32 33 # Class variable for storing the class instance (for the singleton design pattern). 34 _instance = None 35
36 - def __init__(self):
37 """Define all the parameters of the analysis.""" 38 39 # The object is already initialised. 40 if self._initialised: return 41 42 # Execute the base class __init__ method. 43 Param_list.__init__(self) 44 45 # Add the base information for the analysis. 46 self._add_csa(default=N15_CSA) 47 48 # Add the model parameters. 49 self._add('j0', scope='spin', string='J(0)', desc='Spectral density value at 0 MHz - J(0)', py_type=float, set='params', grace_string='\\qJ(0)\\Q', err=True, sim=True) 50 self._add('jwx', scope='spin', string='J(wX)', desc='Spectral density value at the frequency of the heteronucleus - J(wX)', py_type=float, set='params', grace_string='\\qJ(\\xw\\f{}\\sX\\N)\\Q', err=True, sim=True) 51 self._add('jwh', scope='spin', string='J(wH)', desc='Spectral density value at the frequency of the proton - J(wH)', py_type=float, set='params', grace_string='\\qJ(\\xw\\f{}\\sH\\N)\\Q', err=True, sim=True) 52 53 # Set up the user function documentation. 54 self._set_uf_title("Reduced spectral density mapping parameters") 55 self._uf_param_table(label="table: J(w) parameters", caption="Reduced spectral density mapping parameters.") 56 self._uf_param_table(label="table: J(w) parameter value setting", caption="Reduced spectral density mapping parameters.") 57 self._uf_param_table(label="table: J(w) parameter value setting with defaults", caption="Reduced spectral density mapping parameter value setting.", default=True) 58 59 # Value setting documentation. 60 for doc in self._uf_doc_loop(["table: J(w) parameter value setting", "table: J(w) parameter value setting with defaults"]): 61 doc.add_paragraph("In reduced spectral density mapping, the CSA value must be set prior to the calculation of spectral density values.")
62