Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Climate Lab Test Stand
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MSK-SW
Low-Level Radio Frequency
Climate Lab
Climate Lab Test Stand
Commits
cf58c731
Commit
cf58c731
authored
2 years ago
by
Martin Killenberg
Browse files
Options
Downloads
Patches
Plain Diff
temperature sweep working from GUI
parent
55c36d76
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Python_script/climate-lab-gui.py
+32
-5
32 additions, 5 deletions
Python_script/climate-lab-gui.py
with
32 additions
and
5 deletions
Python_script/climate-lab-gui.py
+
32
−
5
View file @
cf58c731
from
PyQt5.QtWidgets
import
QMainWindow
,
QApplication
,
QPushButton
,
QTextEdit
from
PyQt5.QtWidgets
import
QMainWindow
,
QApplication
,
QPushButton
,
QTextEdit
from
PyQt5
import
uic
,
QtCore
,
QtGui
,
QtWidgets
from
PyQt5
import
uic
,
QtCore
,
QtGui
,
QtWidgets
import
sys
import
sys
import
prototype
import
json
class
TestStandMainWindow
(
QMainWindow
):
class
TestStandMainWindow
(
QMainWindow
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
().
__init__
(
*
args
,
**
kwargs
)
super
().
__init__
(
*
args
,
**
kwargs
)
uic
.
loadUi
(
'
climate-lab-main.ui
'
,
self
)
uic
.
loadUi
(
'
climate-lab-main.ui
'
,
self
)
self
.
startButton
.
clicked
.
connect
(
lambda
:
self
.
doMeasurement
())
def
doMeasurement
(
self
):
self
.
setEnabled
(
False
)
with
open
(
'
test_stand_parameter.json
'
,
'
r
'
)
as
f
:
config_data
=
json
.
load
(
f
)
output_basename
=
self
.
baseName
.
text
()
meas
=
prototype
.
Measurements
(
config_data
[
'
chamber_ip
'
],
config_data
[
'
vna_ip
'
],
output_basename
,
False
,
config_data
)
try
:
temperatures
=
meas
.
perform_temperature_sweep
(
self
.
startParameter
.
value
(),
self
.
stopParameter
.
value
(),
self
.
stepParameter
.
value
(),
self
.
fixedParameter
.
value
(),
self
.
soakingTime
.
value
(),
self
.
stableReads
.
value
())
temp_extensions
=
[]
for
t
in
temperatures
:
temp_extensions
.
append
(
str
(
t
)
+
'
deg_
'
+
str
(
self
.
fixedParameter
.
value
())
+
'
rh
'
)
prototype
.
plot_output
(
output_basename
,
temp_extensions
,
True
,
output_basename
+
'
: Temperature sweep
'
+
str
(
temperatures
[
0
])
+
'
degC to
'
+
str
(
temperatures
[
-
1
])
+
'
degC
'
)
finally
:
meas
.
chamber
.
close
()
self
.
setEnabled
(
True
)
app
=
QApplication
(
sys
.
argv
)
if
__name__
==
'
__main__
'
:
mainWindow
=
TestStandMainWindow
()
app
=
QApplication
(
sys
.
argv
)
mainWindow
.
show
()
mainWindow
=
TestStandMainWindow
()
app
.
exec_
()
mainWindow
.
show
()
app
.
exec_
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment