Package bmrblib :: Package experimental_details :: Module nmr_spectrometer
[hide private]
[frames] | no frames]

Source Code for Module bmrblib.experimental_details.nmr_spectrometer

 1  ############################################################################# 
 2  #                                                                           # 
 3  # The BMRB library.                                                         # 
 4  #                                                                           # 
 5  # Copyright (C) 2009-2010 Edward d'Auvergne                                 # 
 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 method saveframe category. 
24   
25  For example, see http://www.bmrb.wisc.edu/dictionary/3.1html_frame/frame_SaveFramePage.html#method 
26  """ 
27   
28  # relax module imports. 
29  from bmrblib.base_classes import BaseSaveframe, TagCategory, TagCategoryFree 
30   
31   
32 -class NMRSpectrometerSaveframe(BaseSaveframe):
33 """The NMR spectrometer saveframe class.""" 34 35 # Class variables. 36 sf_label = 'spectrometer' 37
38 - def add_tag_categories(self):
39 """Create the tag categories.""" 40 41 # The tag category objects. 42 self.tag_categories.append(NMRSpectrometer(self))
43 44 45
46 -class NMRSpectrometer(TagCategoryFree):
47 """Base class for the NMRSpectrometer tag category.""" 48
49 - def __init__(self, sf):
50 """Setup the NMRSpectrometer tag category. 51 52 @param sf: The saveframe object. 53 @type sf: saveframe instance 54 """ 55 56 # Initialise the baseclass. 57 super(NMRSpectrometer, self).__init__(sf) 58 59 # Add the tag info. 60 self.add(key='NMRSpectrometerID', tag_name='ID', var_name='count_str') 61 self.add(key='Details', tag_name='Details', var_name='details') 62 self.add(key='Manufacturer', tag_name='Manufacturer', var_name='manufacturer') 63 self.add(key='Model', tag_name='Model', var_name='model') 64 self.add(key='SerialNumber', tag_name='Serial_number', var_name='serial_number') 65 self.add(key='Field_strength', tag_name='Field_strength', var_name='frq')
66