Skip to content
GitLab
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
d919d73f
Commit
d919d73f
authored
Oct 29, 2017
by
marc
Browse files
version 0.99
parent
f231c8bb
Changes
3
Hide whitespace changes
Inline
Side-by-side
DTObs.py
View file @
d919d73f
...
...
@@ -247,9 +247,10 @@ class DTObservationProgram(Ui_mainWindow):
self
.
myMetaData
.
LSREnabled
=
self
.
radioButtonLSR
.
isChecked
()
def
writeMetaData
(
self
,
file
):
for
d
ata
in
self
.
myMetaData
.
getMetaData
()
:
file
.
write
(
'#{:20}: {:40}
\n
'
.
format
(
data
[
0
],
str
(
data
[
1
])))
myMetaD
ata
=
self
.
myMetaData
.
getMetaData
()
for
data
in
myMetaData
:
logging
.
info
(
'#{:20}: {:40}'
.
format
(
data
[
0
],
str
(
data
[
1
])))
file
.
write
(
'#{:20}: {:40}
\n
'
.
format
(
data
[
0
],
str
(
data
[
1
])))
def
doMeasurement
(
self
,
measnum
,
progressSignal
=
None
):
"""
...
...
@@ -261,6 +262,7 @@ class DTObservationProgram(Ui_mainWindow):
measFile: result file storing the stdout results including meta data
"""
self
.
integrationTime
=
self
.
spinBoxIntTime
.
value
()
self
.
centralFrequency
=
self
.
spinBoxCentralFrequency
.
value
()
self
.
measProgramme
=
self
.
comboBoxProgramma
.
currentText
()
self
.
outputDir
=
self
.
lineEditOutputDir
.
text
()
+
'/'
self
.
outputFile
=
'DT-'
+
'{:03d}'
.
format
(
measnum
)
+
'-'
+
time
.
strftime
(
"%Y%m%d"
)
+
'.dat'
...
...
@@ -271,7 +273,7 @@ class DTObservationProgram(Ui_mainWindow):
logging
.
info
(
"Output to file: {}"
.
format
(
measFile
))
self
.
myMeas
.
startMeasurement
(
self
.
measProgramme
,
self
.
integrationTime
,
measFile
)
self
.
myMeas
.
startMeasurement
(
self
.
measProgramme
,
self
.
centralFrequency
,
self
.
integrationTime
,
measFile
)
for
sec
in
range
(
self
.
integrationTime
):
remainstring
=
str
(
int
((
self
.
integrationTime
-
sec
)
/
60
))
+
":"
...
...
ui/dtobswindow.py
View file @
d919d73f
...
...
@@ -91,7 +91,7 @@ class Ui_mainWindow(object):
self
.
toolBox
.
setFrameShape
(
QtWidgets
.
QFrame
.
NoFrame
)
self
.
toolBox
.
setObjectName
(
"toolBox"
)
self
.
toolBoxMetaData
=
QtWidgets
.
QWidget
()
self
.
toolBoxMetaData
.
setGeometry
(
QtCore
.
QRect
(
0
,
0
,
96
,
26
))
self
.
toolBoxMetaData
.
setGeometry
(
QtCore
.
QRect
(
0
,
0
,
280
,
4
26
))
self
.
toolBoxMetaData
.
setObjectName
(
"toolBoxMetaData"
)
self
.
groupBox_3
=
QtWidgets
.
QGroupBox
(
self
.
toolBoxMetaData
)
self
.
groupBox_3
.
setGeometry
(
QtCore
.
QRect
(
10
,
10
,
271
,
351
))
...
...
@@ -135,7 +135,7 @@ class Ui_mainWindow(object):
self
.
groupBox_2
.
setTitle
(
""
)
self
.
groupBox_2
.
setObjectName
(
"groupBox_2"
)
self
.
gridLayoutWidget
=
QtWidgets
.
QWidget
(
self
.
groupBox_2
)
self
.
gridLayoutWidget
.
setGeometry
(
QtCore
.
QRect
(
10
,
10
,
261
,
14
1
))
self
.
gridLayoutWidget
.
setGeometry
(
QtCore
.
QRect
(
10
,
10
,
261
,
14
6
))
self
.
gridLayoutWidget
.
setObjectName
(
"gridLayoutWidget"
)
self
.
gridLayout_2
=
QtWidgets
.
QGridLayout
(
self
.
gridLayoutWidget
)
self
.
gridLayout_2
.
setHorizontalSpacing
(
7
)
...
...
@@ -161,11 +161,21 @@ class Ui_mainWindow(object):
self
.
pushButtonOutputDirectory
.
setObjectName
(
"pushButtonOutputDirectory"
)
self
.
gridLayout_2
.
addWidget
(
self
.
pushButtonOutputDirectory
,
1
,
0
,
1
,
1
)
self
.
spinBoxIntTime
=
QtWidgets
.
QSpinBox
(
self
.
gridLayoutWidget
)
self
.
spinBoxIntTime
.
setAlignment
(
QtCore
.
Qt
.
AlignCenter
)
self
.
spinBoxIntTime
.
setMinimum
(
1
)
self
.
spinBoxIntTime
.
setMaximum
(
3600
)
self
.
spinBoxIntTime
.
setProperty
(
"value"
,
2
)
self
.
spinBoxIntTime
.
setObjectName
(
"spinBoxIntTime"
)
self
.
gridLayout_2
.
addWidget
(
self
.
spinBoxIntTime
,
2
,
1
,
1
,
1
)
self
.
label_5
=
QtWidgets
.
QLabel
(
self
.
gridLayoutWidget
)
self
.
label_5
.
setObjectName
(
"label_5"
)
self
.
gridLayout_2
.
addWidget
(
self
.
label_5
,
3
,
0
,
1
,
1
)
self
.
spinBoxCentralFrequency
=
QtWidgets
.
QSpinBox
(
self
.
gridLayoutWidget
)
self
.
spinBoxCentralFrequency
.
setAlignment
(
QtCore
.
Qt
.
AlignCenter
)
self
.
spinBoxCentralFrequency
.
setMaximum
(
1450
)
self
.
spinBoxCentralFrequency
.
setProperty
(
"value"
,
1420
)
self
.
spinBoxCentralFrequency
.
setObjectName
(
"spinBoxCentralFrequency"
)
self
.
gridLayout_2
.
addWidget
(
self
.
spinBoxCentralFrequency
,
3
,
1
,
1
,
1
)
self
.
verticalLayoutWidget
=
QtWidgets
.
QWidget
(
self
.
groupBox_2
)
self
.
verticalLayoutWidget
.
setGeometry
(
QtCore
.
QRect
(
10
,
160
,
261
,
80
))
self
.
verticalLayoutWidget
.
setObjectName
(
"verticalLayoutWidget"
)
...
...
@@ -179,7 +189,7 @@ class Ui_mainWindow(object):
self
.
verticalLayout_2
.
addWidget
(
self
.
checkBoxDTModel
)
self
.
toolBox
.
addItem
(
self
.
toolBoxMeasurement
,
""
)
self
.
toolBoxBackEnd
=
QtWidgets
.
QWidget
()
self
.
toolBoxBackEnd
.
setGeometry
(
QtCore
.
QRect
(
0
,
0
,
96
,
26
))
self
.
toolBoxBackEnd
.
setGeometry
(
QtCore
.
QRect
(
0
,
0
,
280
,
4
26
))
self
.
toolBoxBackEnd
.
setObjectName
(
"toolBoxBackEnd"
)
self
.
groupBox
=
QtWidgets
.
QGroupBox
(
self
.
toolBoxBackEnd
)
self
.
groupBox
.
setEnabled
(
True
)
...
...
@@ -344,6 +354,7 @@ class Ui_mainWindow(object):
self
.
comboBoxProgramma
.
setItemText
(
3
,
_translate
(
"mainWindow"
,
"rawrecord"
))
self
.
label_3
.
setText
(
_translate
(
"mainWindow"
,
" Integration Time: "
))
self
.
pushButtonOutputDirectory
.
setText
(
_translate
(
"mainWindow"
,
"Output Dir"
))
self
.
label_5
.
setText
(
_translate
(
"mainWindow"
,
"Central Frequency:"
))
self
.
checkBoxRefraction
.
setText
(
_translate
(
"mainWindow"
,
"Refraction enabled"
))
self
.
checkBoxDTModel
.
setText
(
_translate
(
"mainWindow"
,
"DT Model enabled"
))
self
.
toolBox
.
setItemText
(
self
.
toolBox
.
indexOf
(
self
.
toolBoxMeasurement
),
_translate
(
"mainWindow"
,
"Measurement Settings"
))
...
...
ui/dtobswindow.ui
View file @
d919d73f
...
...
@@ -226,8 +226,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
96
</width>
<height>
26
</height>
<width>
280
</width>
<height>
4
26
</height>
</rect>
</property>
<attribute
name=
"label"
>
...
...
@@ -339,7 +339,7 @@
<x>
10
</x>
<y>
10
</y>
<width>
261
</width>
<height>
14
1
</height>
<height>
14
6
</height>
</rect>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout_2"
>
...
...
@@ -403,6 +403,9 @@
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QSpinBox"
name=
"spinBoxIntTime"
>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
<property
name=
"minimum"
>
<number>
1
</number>
</property>
...
...
@@ -414,6 +417,26 @@
</property>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_5"
>
<property
name=
"text"
>
<string>
Central Frequency:
</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QSpinBox"
name=
"spinBoxCentralFrequency"
>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
<property
name=
"maximum"
>
<number>
1450
</number>
</property>
<property
name=
"value"
>
<number>
1420
</number>
</property>
</widget>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"verticalLayoutWidget"
>
...
...
@@ -449,8 +472,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
96
</width>
<height>
26
</height>
<width>
280
</width>
<height>
4
26
</height>
</rect>
</property>
<attribute
name=
"label"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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