Package prompt :: Module jw_mapping
[hide private]
[frames] | no frames]

Source Code for Module prompt.jw_mapping

 1  ############################################################################### 
 2  #                                                                             # 
 3  # Copyright (C) 2004-2005 Edward d'Auvergne                                   # 
 4  #                                                                             # 
 5  # This file is part of the program relax.                                     # 
 6  #                                                                             # 
 7  # relax 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 2 of the License, or           # 
10  # (at your option) any later version.                                         # 
11  #                                                                             # 
12  # relax 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 relax; if not, write to the Free Software                        # 
19  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   # 
20  #                                                                             # 
21  ############################################################################### 
22   
23  import sys 
24   
25  import help 
26   
27   
28 -class Jw_mapping:
29 - def __init__(self, relax):
30 # Help. 31 self.__relax_help__ = \ 32 """Class containing functions specific to reduced spectral density mapping.""" 33 34 # Add the generic help string. 35 self.__relax_help__ = self.__relax_help__ + "\n" + help.relax_class_help 36 37 # Place relax in the class namespace. 38 self.__relax__ = relax
39 40
41 - def set_frq(self, run=None, frq=None):
42 """Function for selecting which relaxation data to use in the J(w) mapping. 43 44 Keyword Arguments 45 ~~~~~~~~~~~~~~~~~ 46 47 run: The name of the run. 48 49 frq: The spectrometer frequency in Hz. 50 51 52 Description 53 ~~~~~~~~~~~ 54 55 This function will select the relaxation data to use in the reduced spectral density mapping 56 corresponding to the given frequency. 57 58 59 Examples 60 ~~~~~~~~ 61 62 relax> jw_mapping.set_frq('jw', 600.0 * 1e6) 63 relax> jw_mapping.set_frq(run='jw', frq=600.0 * 1e6) 64 """ 65 66 # Function intro text. 67 if self.__relax__.interpreter.intro: 68 text = sys.ps3 + "jw_mapping.set_frq(" 69 text = text + "run=" + `run` 70 text = text + ", frq=" + `frq` + ")" 71 print text 72 73 # The run argument. 74 if type(run) != str: 75 raise RelaxStrError, ('run', run) 76 77 # The frq argument. 78 if type(frq) != float: 79 raise RelaxStrError, ('frq', frq) 80 81 # Execute the functional code. 82 self.__relax__.specific.jw_mapping.set_frq(run=run, frq=frq)
83