Пример #1
0
        def get_attr(attrname):
            if attrname == 'labnumber':
                if self.user_defined_aliquot and not self.is_special():
                    v = make_rid(self.labnumber, self.aliquot)
                else:
                    v = self.labnumber
            elif attrname.endswith('script'):
                # remove mass spectrometer name
                v = getattr(self, attrname)
                # v = self._remove_mass_spectrometer_name(v)
                v = remove_extension(v)

            elif attrname == 'overlap':
                o, m = self.overlap
                if m:
                    v = '{},{}'.format(*self.overlap)
                else:
                    v = o
            else:
                try:
                    v = getattr(self, attrname)
                except AttributeError as e:
                    v = ''

            return v
Пример #2
0
        def get_attr(attrname):
            if attrname == 'labnumber':
                if self.user_defined_aliquot and not self.is_special():
                    v = make_rid(self.labnumber, self.aliquot)
                else:
                    v = self.labnumber
            elif attrname.endswith('script'):
                # remove mass spectrometer name
                v = getattr(self, attrname)
                # v = self._remove_mass_spectrometer_name(v)
                v = remove_extension(v)

            elif attrname == 'overlap':
                o, m = self.overlap
                if m:
                    v = '{},{}'.format(*self.overlap)
                else:
                    v = o
            else:
                try:
                    v = getattr(self, attrname)
                except AttributeError as e:
                    v = ''

            return v
Пример #3
0
 def get_attr(attrname):
     if attrname == "labnumber":
         if self.user_defined_aliquot:
             v = make_rid(self.labnumber, self.aliquot)
         else:
             v = self.labnumber
     elif attrname.endswith("script"):
         # remove mass spectrometer name
         v = getattr(self, attrname)
         v = self._remove_mass_spectrometer_name(v)
         v = self._remove_file_extension(v)
     else:
         try:
             v = getattr(self, attrname)
         except AttributeError, e:
             v = ""
Пример #4
0
 def get_attr(attrname):
     if attrname == 'labnumber':
         if self.user_defined_aliquot:
             v = make_rid(self.labnumber, self.aliquot)
         else:
             v = self.labnumber
     elif attrname.endswith('script'):
         # remove mass spectrometer name
         v = getattr(self, attrname)
         v = self._remove_mass_spectrometer_name(v)
         v = self._remove_file_extension(v)
     else:
         try:
             v = getattr(self, attrname)
         except AttributeError, e:
             v = ''
Пример #5
0
        def get_attr(attrname):
            if attrname == "labnumber":
                if self.user_defined_aliquot and not self.is_special():
                    v = make_rid(self.labnumber, self.aliquot)
                else:
                    v = self.labnumber
            elif attrname.endswith("script"):
                # remove mass spectrometer name
                v = getattr(self, attrname)
                # v = self._remove_mass_spectrometer_name(v)
                v = remove_extension(v)

            elif attrname == "overlap":
                o, m = self.overlap
                if m:
                    v = "{},{}".format(*self.overlap)
                else:
                    v = o
            else:
                try:
                    v = getattr(self, attrname)
                except AttributeError, e:
                    v = ""