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

Source Code for Module bmrblib.experimental_details.experiment

  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 model_free saveframe category (used to be called order_parameters). 
 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#order_parameters 
 28  """ 
 29   
 30  # relax module imports. 
 31  from bmrblib.base_classes import BaseSaveframe, TagCategory, TagCategoryFree 
 32   
 33   
34 -class ExperimentSaveframe(BaseSaveframe):
35 """The Order parameters saveframe class.""" 36 37 # Class variables. 38 sf_label = 'experiment_list' 39
40 - def add_tag_categories(self):
41 """Create the v3.1 tag categories.""" 42 43 # The tag category objects. 44 self.tag_categories.append(ExperimentList(self)) 45 self.tag_categories.append(Experiment(self))
46 47
48 -class ExperimentList(TagCategoryFree):
49 """Base class for the ExperimentList tag category.""" 50
51 - def __init__(self, sf):
52 """Setup the ExperimentList tag category. 53 54 @param sf: The saveframe object. 55 @type sf: saveframe instance 56 """ 57 58 # Initialise the baseclass. 59 super(ExperimentList, self).__init__(sf) 60 61 # Add the tag info. 62 self.add(key='ExperimentListID', tag_name='ID', var_name='count_str', format='int') 63 self.add(key='Details', tag_name='Details', var_name='details', format='str')
64 65 66
67 -class Experiment(TagCategory):
68 """Base class for the Experiment tag category.""" 69
70 - def __init__(self, sf):
71 """Setup the Experiment tag category. 72 73 @param sf: The saveframe object. 74 @type sf: saveframe instance 75 """ 76 77 # Initialise the baseclass. 78 super(Experiment, self).__init__(sf) 79 80 # Add the tag info. 81 self.add(key='ExperimentID', tag_name='ID', var_name='data_ids', format='int') 82 self.add(key='Name', tag_name='Name', var_name='name', format='str') 83 self.add(key='RawDataFlag', tag_name='Raw_data_flag', var_name='data_flag', format='str', default='yes') 84 self.add(key='NMRSpecExptID', tag_name='NMR_spec_expt_ID', var_name='nmr_spec_expt_id', format='int') 85 self.add(key='NMRSpecExptLabel', tag_name='NMR_spec_expt_label', var_name='nmr_spec_expt_label', format='str') 86 self.add(key='SampleID', tag_name='Sample_ID', var_name='sample_id', format='int', default=1) 87 self.add(key='SampleLabel', tag_name='Sample_label', var_name='sample_label', format='str', default='$sample_1') 88 self.add(key='SampleState', tag_name='Sample_state', var_name='sample_state', format='str') 89 self.add(key='SampleVolume', tag_name='Sample_volume', var_name='sample_volume', format='float') 90 self.add(key='SampleVolumeUnits', tag_name='Sample_volume_units', var_name='sample_volume_units', format='str') 91 self.add(key='SampleConditionListID', tag_name='Sample_condition_list_ID', var_name='sample_cond_list_id', format='int', default=1) 92 self.add(key='SampleConditionListLabel', tag_name='Sample_condition_list_label', var_name='sample_cond_list_label', format='str', default='$conditions_1') 93 self.add(key='Sample_spinning_rate ', tag_name='SampleSpinningRate', var_name='sample_spin_rate', format='float') 94 self.add(key='SampleAngle', tag_name='Sample_angle', var_name='sample_angle', format='float') 95 self.add(key='NMRTubeType', tag_name='NMR_tube_type', var_name='nmr_tube_type', format='str') 96 self.add(key='NMRSpectrometerID', tag_name='NMR_spectrometer_ID', var_name='spectrometer_ids', format='int') 97 self.add(key='NMRSpectrometerLabel', tag_name='NMR_spectrometer_label', var_name='spectrometer_labels', format='str') 98 self.add(key='NMRSpectrometerProbeID', tag_name='NMR_spectrometer_probe_ID', var_name='NMR_spectrometer_probe_ID', format='int') 99 self.add(key='NMRSpectrometerProbeLabel', tag_name='NMR_spectrometer_probe_label', var_name='NMR_spectrometer_probe_label', format='str') 100 self.add(key='NMRSpectralProcessingID', tag_name='NMR_spectral_processing_ID', var_name='NMR_spectral_processing_ID', format='int') 101 self.add(key='NMRSpectralProcessingLabel', tag_name='NMR_spectral_processing_label', var_name='NMR_spectral_processing_label', format='str') 102 self.add(key='ExperimentListID', tag_name='Experiment_list_ID', var_name='count_str', format='int')
103