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

added meta data Observer and Description

parent a18e8d03
......@@ -75,7 +75,7 @@ class DTObservationProgram(Ui_mainWindow):
self.pushButtonStartMeasurement.clicked.connect(self.startMeasurement)
self.pushButtonStopMeasurement.clicked.connect(self.stopMeasurement)
#self.myDT = telescope(setmode='J2000', consoleHost='consoledemo.dmz.camras.nl')
self.myDT = telescope(setmode='J2000', consoleHost='consoledemo.dmz.camras.nl')
self.threadpool = QThreadPool()
......@@ -83,7 +83,7 @@ class DTObservationProgram(Ui_mainWindow):
'''
Clear tableWidget and read pointings from file
'''
fileName,_ = QFileDialog.getOpenFileName(None, 'Open File', '/home/marc/git/CAMRASTools/DTObs')
fileName,_ = QFileDialog.getOpenFileName(None, 'Open File', '~/')
if fileName:
reader = csv.reader(open(fileName),delimiter='\t')
rowPosition = self.tableWidgetPointings.rowCount()
......@@ -164,14 +164,15 @@ class DTObservationProgram(Ui_mainWindow):
data: is the stdout result which need to be stored line by line
measFile: result file stroing the stdout results including meta data
"""
measFile = open("Obs/DT-" + str(measnum) + "-" + time.strftime("%Y%m%d") + ".dat",'w')
print("Output to file:", measFile)
integrationTime = self.spinBoxIntTime.value()
measProgramme = self.comboBoxProgramma.currentText()
outputDir = self.lineEditOutputDir.text()
measFile = open(outputDir + 'DT-' + '{:03d}'.format(measnum) + "-" + time.strftime("%Y%m%d") + ".dat",'w')
""" Write meta data into measFile"""
measFile.write("#Time: " + time.strftime("%h%m%s") + "\n")
measFile.write("#Observer: CAMRAS\n")
measFile.write("#Date: " + time.strftime("%Y%m%d-%h%m%s") + "\n")
measFile.write("#RA: xyz\n")
measFile.write("#Dec: xyz\n")
measFile.write("#Integration time: " + str(integrationTime) + "\n")
......
Markdown is supported
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