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