def ACQUISITION_START_TIME(self, val): if utilities.is_positive_number(val): self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'AVERAGES', 'Variable': 'ACQUISITION_START_TIME', 'Success': True, 'Previous': self.__ACQUISITION_START_TIME, 'New': val, 'ErrorMessage': None, 'Location': self.__location }) self.__ACQUISITION_START_TIME = val else: errorMessage = ( "Invalid option for ACQUISITION_START_TIME: {}".format(val)) self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'AVERAGES', 'Variable': 'ACQUISITION_START_TIME', 'Success': False, 'Previous': self.__ACQUISITION_START_TIME, 'New': val, 'ErrorMessage': errorMessage, 'Location': self.__location }) self.__errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'Setter', 'Module': 'AVERAGES', 'Variable': 'ACQUISITION_START_TIME', 'ErrorMessage': errorMessage, 'Location': self.__location })
def RMS_FORCE(self, val): if utilities.is_positive_number(val): self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'GEO_OPT', 'Variable': 'RMS_FORCE', 'Success': True, 'Previous': self.__RMS_FORCE, 'New': val, 'ErrorMessage': None, 'Location': self.__location }) self.__RMS_FORCE = val else: errorMessage = "RMS_FORCE must be a positive NUMBER." self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'GEO_OPT', 'Variable': 'RMS_FORCE', 'Success': False, 'Previous': self.__RMS_FORCE, 'New': val, 'ErrorMessage': errorMessage, 'Location': self.__location }) self.__errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'Setter', 'Module': 'GEO_OPT', 'Variable': 'RMS_FORCE', 'ErrorMessage': errorMessage, 'Location': self.__location })
def TEMPERATURE(self, val): if utilities.is_positive_number(val): self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'MD', 'Variable': 'TEMPERATURE', 'Success': True, 'Previous': self.__TEMPERATURE, 'New': val, 'ErrorMessage': None, 'Location': self.__location }) self.__TEMPERATURE = val else: errorMessage = "TEMPERATURE must be a positive integer." self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'MD', 'Variable': 'TEMPERATURE', 'Success': False, 'Previous': self.__TEMPERATURE, 'New': val, 'ErrorMessage': errorMessage, 'Location': self.__location }) self.__errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'Setter', 'Module': 'MD', 'Variable': 'TEMPERATURE', 'ErrorMessage': errorMessage, 'Location': self.__location })
def _validate_timecon(val): if utilities.is_positive_number(val) or (val is None): return val else: errorMessage = "Nose TIMECON must be a positive number." self.__errorLog.append({'Date':datetime.datetime.now(),'Type':'init','Module':'NOSE', 'Variable':'YOSHIDA','ErrorMessage':errorMessage}) raise TypeError
def TIMECON(self,val): if utilities.is_positive_number(val): self.__changeLog.append({'Date':datetime.datetime.now(),'Module':'NOSE','Variable':'TIMECON', 'Success':True,'Previous':self.__MTS,'New':val,'ErrorMessage':None, 'Location':self.__location}) self.__TIMECON = val else: errorMessage = "Nose TIMECON must be a positive number." self.__errorLog.append({'Date':datetime.datetime.now(),'Type':'Setter','Module':'NOSE', 'Variable':'TIMECON','ErrorMessage':errorMessage,'Location':self.__location}) self.__changeLog.append({'Date':datetime.datetime.now(),'Module':'NOSE','Variable':'TIMECON', 'Success':False,'Previous':self.__TIMECON,'New':val, 'ErrorMessage':errorMessage,'Location':self.__location})
def _validate_ACQUISITION_START_TIME(val, errorLog=[]): if utilities.is_positive_number(val) or (val is None): return val else: errorMessage = ( "Invalid option for ACQUISITION_START_TIME: {}. Must be a positive number" .format(val)) errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'init', 'Module': 'AVERAGES', 'Variable': 'ACQUISITION_START_TIME', 'ErrorMessage': errorMessage }) raise TypeError