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
681f295e
Commit
681f295e
authored
2 years ago
by
Martin Killenberg
Browse files
Options
Downloads
Patches
Plain Diff
prepare plot_measurement for re-plotting
parent
ffef8a77
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/prototype.py
+13
-7
13 additions, 7 deletions
Python_script/prototype.py
with
13 additions
and
7 deletions
Python_script/prototype.py
+
13
−
7
View file @
681f295e
...
...
@@ -276,8 +276,10 @@ class Measurements:
(
float
(
readback_hum
)
<=
target_hum
+
self
.
max_delta_hum
)
# plot a single measurement (phase, magnitude, temp and hum against time) from a pandas data frame
def
plot_measurement
(
data_frame
,
show_plot_window
,
save_pdf
=
True
):
fig
,
ax1
=
plt
.
subplots
(
2
,
figsize
=
(
12
,
10
))
def
plot_measurement
(
data_frame
,
show_blocking_plot
,
save_pdf
=
True
,
subplot_tuple
=
(
None
,
None
)):
fig
,
ax1
=
subplot_tuple
if
fig
is
None
or
ax1
is
None
:
fig
,
ax1
=
plt
.
subplots
(
2
,
figsize
=
(
12
,
10
))
fig
.
suptitle
(
"
Graphical representation of chamber output
"
,
color
=
"
red
"
)
path_collection01
=
ax1
[
0
].
scatter
(
data_frame
.
TIMESTAMP
,
data_frame
.
S21_PHASE
,
c
=
'
red
'
,
marker
=
'
<
'
,
label
=
'
Phase
'
)
...
...
@@ -319,12 +321,16 @@ def plot_measurement(data_frame, show_plot_window, save_pdf=True):
if
save_pdf
:
fig
.
savefig
(
output_basename
+
'
_graph.pdf
'
)
if
show_plot_window
:
plt
.
show
()
# turn interactive on if we are not supposed to block, otherwise turn it off
if
show_blocking_plot
:
plt
.
ioff
()
else
:
plt
.
ion
()
plt
.
show
()
def
plot_output
(
output_basename
,
show_
p
lo
t_window
,
save_pdf
=
True
):
def
plot_output
(
output_basename
,
show_
b
lo
cking_plot
,
save_pdf
=
True
):
data_frame
=
pd
.
read_csv
(
output_basename
+
'
.csv
'
)
plot_measurement
(
data_frame
,
show_
p
lo
t_window
,
save_pdf
)
plot_measurement
(
data_frame
,
show_
b
lo
cking_plot
,
save_pdf
)
if
__name__
==
'
__main__
'
:
parser
=
ArgumentParser
()
...
...
@@ -344,7 +350,7 @@ if __name__ == '__main__':
help
=
"
Change Chamber mode to standby at the end
"
)
parser
.
add_argument
(
"
-p
"
,
"
--plot
"
,
action
=
"
store_true
"
,
default
=
False
,
help
=
"
Show plot window at the end
"
)
help
=
"
Show
blocking
plot window at the end
"
)
# parser.add_argument("-q", "--quiet",
# action="store_false", dest="verbose", default=True,
...
...
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