Commit 0e158e13 authored by marc's avatar marc
Browse files

completed initial metaData class

parent 6d160e90
......@@ -18,54 +18,70 @@ class MetaData():
Generic Data
'''
logging.info('Initialize MetaData')
self._operator1 =''
self._operator2 =''
self._operator3 =''
self._description = ''
self._startTime = time.strftime("%Y%m%d-%h%m%s")
self.description = ''
self.operator1 =''
self.operator2 =''
self.operator3 =''
self.startTime = time.strftime("%Y%m%d-%h%m%s")
'''
Tool settings
'''
self.tool = 'dumpwide'
self._integrationTime = 2
self._outputDirectory =''
self._outputFile = None
self.integrationTime = 2
self.outputDirectory =''
self.outputFile = None
'''
Pointing
'''
self._radec = None
self.radec = None
'''
DT Settings
'''
self._refractionEnabled = 'False'
self._DTModelEnabled = 'False'
self.refractionEnabled = 'False'
self.DTModelEnabled = 'False'
'''
Backend Settings
'''
self._mode = 'Pulsar'
self._LSREnabled = 'False'
self.mode = 'Pulsar'
self.LSREnabled = 'False'
self.metaDict = {}
def setOperators(self, operator1, operator2, operator3):
self._operator1 = operator1
self._operator2 = operator2
self._operator3 = operator3
logging.info('set Operator 1 is {}'.format(operator1))
def setOutputDirectory(self,outputDirectory):
self._outputDirectory = outputDirectory
def __str__(self):
return
def setTool(self,tool):
self._tool = tool
def getMetaData(self):
metaData =[
('description' , self.description),
('operator1' , self.operator1),
('operator2' , self.operator2),
('operator3' , self.operator3),
('startTime' , self.startTime),
('tool' , self.tool),
('integrationTime' , self.integrationTime),
('outputDir' , self.outputDirectory),
('outputFile' , self.outputFile),
('RaDEC' , self.radec),
('refactionEnabled', self.refractionEnabled),
('DTModelEnabled' , self.DTModelEnabled),
('backEndMode' , self.mode),
('LSREnabled' , self.LSREnabled)
]
self.metaDict = {key: value for key, value in metaData}
logging.info('Return Meta data from MetaData class')
return MetaData
return self.metaDict
if __name__ == '__main__':
myData = MetaData()
myData.setOperators('Tammo-Jan', 'Paul', 'Ard')
logging.info(myData.getMetaData())
logging.info(myData._operator2)
myData.operator1 = 'Ops01'
myData.operator3 = 'Ops03'
myData.LSREnabled = True
logging.info(myData.operator3)
logging.info(myData.startTime)
logging.info(myData.tool)
for k, v in myData.getMetaData().items():
logging.info('#key: {}\t value: {}'.format(k,v))
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment