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
9a81e2e9
Commit
9a81e2e9
authored
1 year ago
by
Alexandros Asonitis
Browse files
Options
Downloads
Patches
Plain Diff
first files for transfer and input
parent
37c15c0d
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
hp4155/ADU/ADU.ipynb
+14
-24
14 additions, 24 deletions
hp4155/ADU/ADU.ipynb
hp4155/ADU/ADU.py
+18
-6
18 additions, 6 deletions
hp4155/ADU/ADU.py
hp4155/ADU/help.py
+34
-1
34 additions, 1 deletion
hp4155/ADU/help.py
hp4155/ADU/measurements_new.py
+2
-1
2 additions, 1 deletion
hp4155/ADU/measurements_new.py
with
68 additions
and
32 deletions
hp4155/ADU/ADU.ipynb
+
14
−
24
View file @
9a81e2e9
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
47115097ad82410f8ffdb
4a33
f87c6dc
",
"model_id": "
295e462e4d
4a
4
33
583afbd54f4360767
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
984d5faddabc438299d9e9da0ef02830
",
"model_id": "
bda925c499bb4680b8afd624c3d625f4
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
d609c57ccece45438fd13230950fa0f1
",
"model_id": "
0fb152bcfc1642288d9862b346d3e09d
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
30ac2d4f66b547718d2ea3eb4f32a0ab
",
"model_id": "
755842ccb9b44ee9a6dd74138828e3bd
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
2224260350714d75aaf46bbfd81efd77
",
"model_id": "
773fbc868d8b4e388f7a6404c864c0f2
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
e716f1b08a844d6fb9fc59ce8ce128b3
",
"model_id": "
f2ab3baa5acf4621888840fa831f0ebf
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
9e36f600f0e546968e01577c808a2eed
",
"model_id": "
e4c96d5c69cd45778f68cfa1423aa6e7
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -151,7 +151,7 @@
...
@@ -151,7 +151,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
9a8235914e2e4dc8a3e9958c6fe2ede3
",
"model_id": "
2f05cb09836f472dbcfede0f24e76cbd
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -172,7 +172,7 @@
...
@@ -172,7 +172,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
cd2aecbe52d04660927415365be227a4
",
"model_id": "
7911d205dd364a4fa630267125d7db45
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -195,7 +195,7 @@
...
@@ -195,7 +195,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
37fa1cb1b2bf4421b72e35b4bc7bb907
",
"model_id": "
886aacc213bc4c809aef5ccfd5c944cc
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -216,7 +216,7 @@
...
@@ -216,7 +216,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
03f11b57e6cb4b7e8252c6d34411bc87
",
"model_id": "
48cc1e19af7b4ce1b1ec9616dff9ad6b
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -239,7 +239,7 @@
...
@@ -239,7 +239,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
8bfd126af9274d4da7b6c598a7c67e26
",
"model_id": "
4b882c7ae21c4c8b86ea8b3b66ba88f8
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -253,7 +253,7 @@
...
@@ -253,7 +253,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6
b034606ebbd4de5b4c35dd531e73ece
",
"model_id": "6
80473ea596845d6871ae0abe5f18381
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -269,20 +269,10 @@
...
@@ -269,20 +269,10 @@
"%run ADU.py"
"%run ADU.py"
]
]
},
},
{
"cell_type": "code",
"execution_count": 4,
"id": "9ca55782-244e-4308-868e-8a6bba5897ab",
"metadata": {},
"outputs": [],
"source": [
"change_state(all_widgets)"
]
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": null,
"execution_count": null,
"id": "3
03f03c1-9447-484e-9bc8-07f00db4607a
",
"id": "3
da7c505-85a3-45e9-853e-86a9c9e30569
",
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": []
"source": []
...
...
%% Cell type:code id:6defdb49-06c2-469d-beb5-bc2e147e3f79 tags:
%% Cell type:code id:6defdb49-06c2-469d-beb5-bc2e147e3f79 tags:
```
python
```
python
%
run
ADU
.
py
%
run
ADU
.
py
```
```
%% Output
%% Output
%% Cell type:code id:9ca55782-244e-4308-868e-8a6bba5897ab tags:
%% Cell type:code id:3da7c505-85a3-45e9-853e-86a9c9e30569 tags:
```
python
change_state
(
all_widgets
)
```
%% Cell type:code id:303f03c1-9447-484e-9bc8-07f00db4607a tags:
```
python
```
python
```
```
...
...
This diff is collapsed.
Click to expand it.
hp4155/ADU/ADU.py
+
18
−
6
View file @
9a81e2e9
...
@@ -110,17 +110,19 @@ def on_start_clicked(b):
...
@@ -110,17 +110,19 @@ def on_start_clicked(b):
smu4
.
update
(
vname
=
'
VS2
'
,
iname
=
'
IS2
'
,
mode
=
'
COMM
'
,
func
=
'
CONS
'
)
smu4
.
update
(
vname
=
'
VS2
'
,
iname
=
'
IS2
'
,
mode
=
'
COMM
'
,
func
=
'
CONS
'
)
#execute measurement
#execute measurement
Vgs
,
Vds
,
Idmm
,
gm
=
Transfer
(
smu1
,
smu2
,
smu3
,
smu4
,
integration_transfer
.
value
,
device
)
Vgs
,
Vds
,
Idmm
,
gm
,
Igmm
=
Transfer
(
smu1
,
smu2
,
smu3
,
smu4
,
integration_transfer
.
value
,
device
)
#plot results
#plot results
clear_output
()
clear_output
()
plot_transfer
(
Vgs
,
Idmm
,
gm
,
points
)
plot_transfer
(
Vgs
,
Idmm
,
gm
,
points
)
#save results
#save results
header
=
[
'
VGS(V)
'
,
'
VDS(V)
'
,
'
IDmm(mA/mm)
'
,
'
gm(mS/mm)
'
]
header
=
[
'
VGS(V)
'
,
'
VDS(V)
'
,
'
IDmm(mA/mm)
'
,
"
IGmm(mA/mm)
"
,
'
gm(mS/mm)
'
]
data
=
{
header
[
0
]:
Vgs
,
header
[
1
]:
Vds
,
header
[
2
]:
Idmm
,
header
[
3
]:
gm
}
data
=
{
header
[
0
]:
Vgs
,
header
[
1
]:
Vds
,
header
[
2
]:
Idmm
,
header
[
3
]:
Igmm
,
header
[
4
]:
gm
}
df
=
pd
.
DataFrame
(
data
)
df
=
pd
.
DataFrame
(
data
)
#write to file
#write to file
filename
=
f
""
filename
=
f
"
{
sample
[
'
sample
'
].
value
}
_
{
sample
[
'
field
'
].
value
}
_
{
sample
[
'
device
'
].
value
}
U.txt
"
file
=
create_file
(
filename
)
save_to_file
(
'
Transfer Curve
'
,
file
,
df
,
sample
,
integration_transfer
,
Vgs_transfer
,
Vds_transfer
)
if
output_check
.
value
==
True
:
if
output_check
.
value
==
True
:
vds_ok
=
check_values
(
Vds_output
[
'
start
'
],
Vds_output
[
'
step
'
],
Vds_output
[
'
stop
'
],
'
primary
'
)
vds_ok
=
check_values
(
Vds_output
[
'
start
'
],
Vds_output
[
'
step
'
],
Vds_output
[
'
stop
'
],
'
primary
'
)
...
@@ -172,7 +174,17 @@ def on_start_clicked(b):
...
@@ -172,7 +174,17 @@ def on_start_clicked(b):
clear_output
()
clear_output
()
plot_output
(
Vds
,
Idmm
,
Igmm
,
points
)
plot_output
(
Vds
,
Idmm
,
Igmm
,
points
)
#save results(later)
#save results
header
=
[
'
VGS(V)
'
,
'
VDS(V)
'
,
'
IDmm(mA/mm)
'
,
"
IGmm(mA/mm)
"
]
data
=
{
header
[
0
]:
Vgs
,
header
[
1
]:
Vds
,
header
[
2
]:
Idmm
,
header
[
3
]:
Igmm
}
df
=
pd
.
DataFrame
(
data
)
#write to file
filename
=
f
"
{
sample
[
'
sample
'
].
value
}
_
{
sample
[
'
field
'
].
value
}
_
{
sample
[
'
device
'
].
value
}
A.txt
"
file
=
create_file
(
filename
)
save_to_file
(
'
Output Curve
'
,
file
,
df
,
sample
,
integration_output
,
Vgs_output
,
Vds_output
)
button
.
on_click
(
on_start_clicked
)
button
.
on_click
(
on_start_clicked
)
...
...
This diff is collapsed.
Click to expand it.
hp4155/ADU/help.py
+
34
−
1
View file @
9a81e2e9
...
@@ -5,6 +5,8 @@ import tkinter as tk
...
@@ -5,6 +5,8 @@ import tkinter as tk
from
tkinter
import
filedialog
from
tkinter
import
filedialog
import
tkinter.messagebox
import
tkinter.messagebox
import
pandas
as
pd
def
plot_transfer
(
x
,
y1
,
y2
,
curves
):
def
plot_transfer
(
x
,
y1
,
y2
,
curves
):
x
=
np
.
array_split
(
x
,
curves
)
x
=
np
.
array_split
(
x
,
curves
)
...
@@ -177,12 +179,43 @@ def create_file(filename):
...
@@ -177,12 +179,43 @@ def create_file(filename):
file
=
filedialog
.
asksaveasfilename
(
defaultextension
=
"
.txt
"
,
filetypes
=
[(
"
Text files
"
,
"
*.txt
"
)],
title
=
"
save results path
"
,
initialfile
=
filename
)
file
=
filedialog
.
asksaveasfilename
(
defaultextension
=
"
.txt
"
,
filetypes
=
[(
"
Text files
"
,
"
*.txt
"
)],
title
=
"
save results path
"
,
initialfile
=
filename
)
#check if the file path is correct(.txt)
#check if the file path is correct(.txt)
while
target_
file
.
endswith
(
"
.txt
"
)
==
False
:
while
file
.
endswith
(
"
.txt
"
)
==
False
:
#open again filedialog with error message box
#open again filedialog with error message box
tk
.
messagebox
.
showerror
(
message
=
'
invalid filename!
'
)
tk
.
messagebox
.
showerror
(
message
=
'
invalid filename!
'
)
file
=
filedialog
.
asksaveasfilename
(
defaultextension
=
"
.txt
"
,
filetypes
=
[(
"
Text files
"
,
"
*.txt
"
)],
title
=
"
save results path
"
,
initialfile
=
filename
)
file
=
filedialog
.
asksaveasfilename
(
defaultextension
=
"
.txt
"
,
filetypes
=
[(
"
Text files
"
,
"
*.txt
"
)],
title
=
"
save results path
"
,
initialfile
=
filename
)
root
.
destroy
()
root
.
destroy
()
return
file
return
file
def
save_to_file
(
measurement
,
file
,
df
,
sample
,
integration
,
Vgs
,
Vds
=
None
):
with
open
(
file
,
'
w
'
)
as
f
:
f
.
write
(
f
"
{
measurement
}
"
+
"
\n
"
)
f
.
write
(
f
"
Processing number:
{
sample
[
'
processing_number
'
].
value
}
"
+
"
\n
"
)
f
.
write
(
f
"
Sample:
{
sample
[
'
sample
'
].
value
}
"
+
"
\n
"
)
f
.
write
(
f
"
Field:
{
sample
[
'
field
'
].
value
}
"
+
"
\n
"
)
f
.
write
(
f
"
Device:
{
sample
[
'
device
'
].
value
}
"
+
"
\n
"
)
f
.
write
(
f
"
Device Width(µm):
{
sample
[
'
width
'
].
value
}
"
+
"
\n\n
"
)
f
.
write
(
'
Parameters
\n
'
)
f
.
write
(
f
'
Integration time:
{
integration
.
value
}
'
+
"
\n
"
)
#calculate the values
Vgs_comp
=
Vgs
[
"
comp
"
].
value
Vgs_pcomp
=
Vgs
[
"
pcomp
"
].
value
if
Vgs_pcomp
==
0
:
f
.
write
(
f
"
Gate Current Compliance(A):
{
Vgs_comp
}
"
+
"
\n
"
)
else
:
f
.
write
(
f
"
Gate Power Compliance(A):
{
Vgs_pcomp
}
"
+
"
\n
"
)
if
Vds
!=
None
:
Vds_comp
=
Vds
[
"
comp
"
].
value
Vds_pcomp
=
Vds
[
"
pcomp
"
].
value
if
Vds_pcomp
==
0
:
f
.
write
(
f
"
Drain Current Compliance(A):
{
Vds_comp
}
"
+
"
\n
"
)
else
:
f
.
write
(
f
"
Drain Power Compliance(A):
{
Vds_pcomp
}
"
+
"
\n
"
)
f
.
write
(
"
\n
Results
\n
"
)
f
.
write
(
df
.
to_string
())
\ No newline at end of file
This diff is collapsed.
Click to expand it.
hp4155/ADU/measurements_new.py
+
2
−
1
View file @
9a81e2e9
...
@@ -96,8 +96,9 @@ def Transfer(smu1,smu2,smu3,smu4,integration,device):
...
@@ -96,8 +96,9 @@ def Transfer(smu1,smu2,smu3,smu4,integration,device):
Idmm
=
device
.
return_values
(
'
IDmm
'
)
Idmm
=
device
.
return_values
(
'
IDmm
'
)
gm
=
device
.
return_values
(
'
Gm
'
)
gm
=
device
.
return_values
(
'
Gm
'
)
Vds
=
device
.
return_values
(
'
VDS
'
)
Vds
=
device
.
return_values
(
'
VDS
'
)
Igmm
=
device
.
return_values
(
'
IGmm
'
)
return
Vgs
,
Vds
,
Idmm
,
gm
return
Vgs
,
Vds
,
Idmm
,
gm
,
Igmm
def
Output
(
smu1
,
smu2
,
smu3
,
smu4
,
integration
,
device
):
def
Output
(
smu1
,
smu2
,
smu3
,
smu4
,
integration
,
device
):
...
...
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