Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
leak analysis
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
vaclab
leak analysis
Commits
b7ee3501
Commit
b7ee3501
authored
1 year ago
by
Ute Becker
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' of gitlab1.ptb.de:vaclab/leak-analysis
parents
d0628052
1dd8aba0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testplot.py
+0
-68
0 additions, 68 deletions
testplot.py
with
0 additions
and
68 deletions
testplot.py
deleted
100644 → 0
+
0
−
68
View file @
d0628052
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 22 11:21:17 2024
@author: becker07
"""
from
matplotlib
import
pyplot
as
plt
import
pathlib
from
statistics
import
mean
from
datetime
import
datetime
from
IPython.display
import
Markdown
as
md
import
numpy
as
np
import
re
import
math
import
statistics
import
pandas
as
pd
import
json
import
couchdb
import
PyPDF2
couch
=
couchdb
.
Server
(
'
http://a73434.berlin.ptb.de:5984
'
)
db
=
couch
[
'
vl_db
'
]
# existing
#json_file = "cal-" + year + "-fm1-" + "-" + cal_cert + "_" + no
json_file
=
"
cal-2024-fm1-kk-75565_0001
"
print
(
json_file
)
doc
=
db
.
get
(
json_file
)
I_Scan_Offs
=
np
.
array
(
doc
[
"
Calibration
"
][
"
Measurement
"
][
"
AuxValues
"
][
"
ScanQMS
"
][
2
][
"
Value
"
])
I_Scan_Offs
=
np
.
float64
(
I_Scan_Offs
[
2
:
-
2
])
I_Scan
=
np
.
array
(
doc
[
"
Calibration
"
][
"
Measurement
"
][
"
AuxValues
"
][
"
ScanQMS
"
][
1
][
"
Value
"
])
I_Scan
=
np
.
float64
(
I_Scan
[
2
:
-
2
])
Mass_Scan
=
np
.
array
(
doc
[
"
Calibration
"
][
"
Measurement
"
][
"
AuxValues
"
][
"
ScanQMS
"
][
0
][
"
Value
"
])
Mass_Scan
=
Mass_Scan
[
2
:
-
2
]
for
i
in
range
(
len
(
Mass_Scan
)):
Mass_Scan
[
i
]
=
re
.
sub
(
r
"
Mass
"
,
""
,
Mass_Scan
[
i
]).
strip
()
Mass_Scan
=
np
.
float64
(
Mass_Scan
)
fig
=
plt
.
figure
()
ax
=
fig
.
add_axes
([
0
,
0
,
4
,
2
])
ax
.
set_xlabel
(
'
Masse
'
)
ax
.
set_ylabel
(
'
QMS-Signal
'
)
ax
.
set_yscale
(
'
log
'
)
#plt.plot(1010,4.65e-10, 'bo')
plt
.
plot
(
Mass_Scan
,
I_Scan
,
label
=
r
'
Flow
'
)
plt
.
plot
(
Mass_Scan
,
I_Scan_Offs
,
label
=
r
'
Offset
'
)
plt
.
legend
()
plt
.
grid
()
fig
.
savefig
(
"
Scan.pdf
"
,
bbox_inches
=
'
tight
'
)
content
=
pathlib
.
Path
(
'
Scan.pdf
'
).
read_bytes
()
db
.
put_attachment
(
doc
,
content
,
"
Scan.pdf
"
,
content_type
=
"'
application/pdf
"
)
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