Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
marc
dtObsGUI
Commits
5d38003c
Commit
5d38003c
authored
Oct 09, 2017
by
marc
Browse files
added meta data Observer and Description
parent
a18e8d03
Changes
1
Hide whitespace changes
Inline
Side-by-side
DTObs.py
View file @
5d38003c
...
...
@@ -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
"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment