Commit 5bfff69b authored by marc's avatar marc
Browse files

minor update

parent 99943c8a
......@@ -3,6 +3,7 @@ import logging
from configparser import ConfigParser
import os.path
import time
from idlelib.dynOptionMenuWidget import _dyn_option_menu
config = ConfigParser()
config.readfp(open(os.path.join(os.path.dirname(__file__), 'measurements.ini')))
......@@ -10,7 +11,7 @@ config.readfp(open(os.path.join(os.path.dirname(__file__), 'measurements.ini')))
logging.basicConfig(level=logging.DEBUG)
class measurements():
def __init__(self,tool=None, integrationTime=None, outputFile=None, metaData=None):
def __init__(self,tool=None, integrationTime=None, outputFile=None, radec=None, metaData=None):
'''
Initializes a measurement instance.
'''
......@@ -18,9 +19,10 @@ class measurements():
self._tools = []
self._integrationTime = integrationTime
self._outputFile = outputFile
self._radec = radec
self._startTime = time.strftime("%Y%m%d-%h%m%s")
self._staticMetaData = {"Observer":"CAMRAS","Date" : self._startTime}
self._dynamicMetaData = None
self._staticMetaData = {"Observer":"CAMRAS","Date" : self._startTime, "RaDEC" : self._radec}
self._dynamicMetaData = {}
'''
Read tools from ini file
'''
......@@ -42,12 +44,17 @@ class measurements():
'''
logging.info('Integration time is set to: {}'.format(self._integrationTime))
return(self._integrationTime)
def getMetaData(self):
'''
read meta data
'''
logging.info('Static meta data is: {}'.format(self._staticMetaData))
return(self._staticMetaData)
metaData = {}
metaData.update(self._staticMetaData)
metaData.update(self._dynamicMetaData)
logging.info('Meta data is: {}'.format(metaData))
return(metaData)
def setTool(self, measProg):
......
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