Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
labcode
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CST
labcode
Commits
88cbbf10
Commit
88cbbf10
authored
1 year ago
by
JupyterHub User
Browse files
Options
Downloads
Patches
Plain Diff
added innen radious plot diagramms and lists with all the values
parent
e784860c
No related branches found
No related tags found
No related merge requests found
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
hp4155/I-V_new.ipynb
+1
-1
1 addition, 1 deletion
hp4155/I-V_new.ipynb
hp4155/measurements.py
+16
-6
16 additions, 6 deletions
hp4155/measurements.py
hp4155/module.py
+1
-0
1 addition, 0 deletions
hp4155/module.py
hp4155/working_examples/pandas.ipynb
+26
-22
26 additions, 22 deletions
hp4155/working_examples/pandas.ipynb
with
44 additions
and
29 deletions
hp4155/I-V_new.ipynb
+
1
−
1
View file @
88cbbf10
...
...
@@ -237,7 +237,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.
11.4
"
"version": "3.
9.7
"
}
},
"nbformat": 4,
...
...
This diff is collapsed.
Click to expand it.
hp4155/measurements.py
+
16
−
6
View file @
88cbbf10
...
...
@@ -62,7 +62,8 @@ def I_V_Measurement(start,stop,step):
#exporting the data frame in an excel file
file_name
=
"
results.csv
"
path
=
r
"
C:\Users\user\Desktop
"
path
=
r
"
\\fileserver.cst.rwth-aachen.de\public\Datentransfer\Asonitis, Alexandros
"
#r"C:\Users\user\Desktop"
directory
=
os
.
path
.
join
(
path
,
file_name
)
df
.
to_csv
(
directory
)
...
...
@@ -141,7 +142,7 @@ def stress_sampling(V2_stress=10,V3_stress=3,stress_time=30,V2_sampling=10,V3_sa
#prepare full measurement
def
ctlm
(
field_name
=
'
M00
'
,
start
=-
50
*
10
**
(
-
3
),
stop
=
50
*
10
**
(
-
3
),
step
=
10
**
(
-
3
),
comp
=
10
,
distances
=
(
5
,
10
,
15
,
25
,
45
),
time
=
'
MED
'
):
def
ctlm
(
field_name
=
'
M00
'
,
start
=-
50
*
10
**
(
-
3
),
stop
=
50
*
10
**
(
-
3
),
step
=
10
**
(
-
3
),
comp
=
10
,
distances
=
(
5
,
10
,
15
,
25
,
45
),
time
=
'
MED
'
,
innen
=
0
):
#connect to the device
device
=
module
.
HP4155a
(
'
GPIB0::17::INSTR
'
)
...
...
@@ -153,6 +154,10 @@ def ctlm(field_name ='M00',start=-50*10**(-3),stop=50*10**(-3),step=10**(-3),com
plt
.
ylabel
(
'
Current(A)
'
)
plt
.
title
(
"
CTLM plot
"
)
#lists for appending all data values
ctlm_voltage
=
[]
ctlm_current
=
[]
ctlm_resistance
=
[]
#execute five measurements
for
j
in
range
(
len
(
distances
)):
...
...
@@ -203,6 +208,9 @@ def ctlm(field_name ='M00',start=-50*10**(-3),stop=50*10**(-3),step=10**(-3),com
voltage_values
=
device
.
return_data
(
'
V3
'
)
current_values
=
device
.
return_data
(
'
I3
'
)
ctlm_voltage
.
append
(
voltage_values
)
ctlm_current
.
append
(
current_values
)
resistance_values
=
[]
for
i
in
range
(
len
(
voltage_values
)):
...
...
@@ -221,7 +229,7 @@ def ctlm(field_name ='M00',start=-50*10**(-3),stop=50*10**(-3),step=10**(-3),com
print
(
df
)
file_name
=
field_name
+
"
_CTLM_
"
+
str
(
j
+
1
)
+
"
.txt
"
path
=
r
"
C:\Users\user\Desktop
"
path
=
r
"
\\fileserver.cst.rwth-aachen.de\public\Datentransfer\Asonitis, Alexandros
"
directory
=
os
.
path
.
join
(
path
,
file_name
)
#export DataFrame to text file (keep header row and index column)
f
=
open
(
directory
,
'
a
'
)
...
...
@@ -229,6 +237,10 @@ def ctlm(field_name ='M00',start=-50*10**(-3),stop=50*10**(-3),step=10**(-3),com
df_string
=
df
.
to_string
()
f
.
write
(
df_string
)
#plot diagramm
plt
.
legend
()
plt
.
show
()
#wait for confirmation from user after a measurement is done
while
True
:
answer
=
input
(
'
please press enter to continue with the next measurement or finish after the last measurement!
'
)
...
...
@@ -236,7 +248,5 @@ def ctlm(field_name ='M00',start=-50*10**(-3),stop=50*10**(-3),step=10**(-3),com
break
#close the connection and plot all the diagramms
plt
.
legend
()
plt
.
show
()
del
device
This diff is collapsed.
Click to expand it.
hp4155/module.py
+
1
−
0
View file @
88cbbf10
...
...
@@ -182,6 +182,7 @@ class HP4155a(object):
#set normal compliance for VAR1 and VAR2
def
comp
(
self
,
variable
,
value
):
"""
"""
command
=
f
"
:PAGE:MEAS:
{
variable
}
:COMP
{
value
}
"
self
.
inst
.
write
(
command
)
...
...
This diff is collapsed.
Click to expand it.
hp4155/working_examples/pandas.ipynb
+
26
−
22
View file @
88cbbf10
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