Commit 1235eff2 authored by marc's avatar marc
Browse files

start moving towards r1.0

parent 192d741f
telescope telescope
measurements
ui/__pycache__ ui/__pycache__
...@@ -102,6 +102,7 @@ class DTObservationProgram(Ui_mainWindow): ...@@ -102,6 +102,7 @@ class DTObservationProgram(Ui_mainWindow):
indexNR=0 indexNR=0
for tool in self.myMeas.getTools(): for tool in self.myMeas.getTools():
self.comboBoxProgramma.setItemText(indexNR, tool) self.comboBoxProgramma.setItemText(indexNR, tool)
indexNR+=1
self.threadpool = QThreadPool() self.threadpool = QThreadPool()
...@@ -146,7 +147,7 @@ class DTObservationProgram(Ui_mainWindow): ...@@ -146,7 +147,7 @@ class DTObservationProgram(Ui_mainWindow):
def allCompleted(self): def allCompleted(self):
""" Callback function when all pointings completed """ """ Callback function when all pointings completed """
loging.info("All pointings completed") logging.info("All pointings completed")
def measCompleted(self, meas_num, status): def measCompleted(self, meas_num, status):
""" Make the meas_num-th row of the table green """ """ Make the meas_num-th row of the table green """
...@@ -155,7 +156,12 @@ class DTObservationProgram(Ui_mainWindow): ...@@ -155,7 +156,12 @@ class DTObservationProgram(Ui_mainWindow):
'Measuring': QtGui.QColor('cyan')} 'Measuring': QtGui.QColor('cyan')}
self.tableWidgetPointings.item(meas_num, 2).setText(status) self.tableWidgetPointings.item(meas_num, 2).setText(status)
for column in range(3): '''
TODO
'''
#self.tableWidgetPointings.item(meas_num, 3).setText(measFile.name))
for column in range(4):
self.tableWidgetPointings.item(meas_num,column).setBackground(colors[status]) self.tableWidgetPointings.item(meas_num,column).setBackground(colors[status])
self.tableWidgetPointings.resizeColumnsToContents() self.tableWidgetPointings.resizeColumnsToContents()
...@@ -205,15 +211,13 @@ class DTObservationProgram(Ui_mainWindow): ...@@ -205,15 +211,13 @@ class DTObservationProgram(Ui_mainWindow):
outputDir = self.lineEditOutputDir.text() outputDir = self.lineEditOutputDir.text()
measFile = open(outputDir + '/DT-' + '{:03d}'.format(measnum) + "-" + time.strftime("%Y%m%d") + ".dat",'w') measFile = open(outputDir + '/DT-' + '{:03d}'.format(measnum) + "-" + time.strftime("%Y%m%d") + ".dat",'w')
logging.info("Output to file: {}".format(measFile)) logging.info("Output to file: {}".format(measFile))
logging.info(measCLI) self.myMeas.startMeasurement(measProgramme, integrationTime, measFile, metaData=None)
myMeas.startMeasurement(measProgramme, integrationTime, measFile, metaData=None)
for sec in range(integrationTime): for sec in range(integrationTime):
remainstring = str(int((integrationTime-sec)/60)) + ":" remainstring = str(int((integrationTime-sec)/60)) + ":"
remainstring += "{:02}".format((integrationTime-sec)%60) remainstring += "{:02}".format((integrationTime-sec)%60)
progressSignal.emit(measnum, int(float(sec)/integrationTime*100), remainstring) progressSignal.emit(measnum, int(float(sec)/integrationTime*100), remainstring)
time.sleep(1) time.sleep(1)
self.measurement.wait()
measFile.close() measFile.close()
def startMeasurement(self): def startMeasurement(self):
......
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