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
42d87ff0
Commit
42d87ff0
authored
1 year ago
by
Alexandros Asonitis
Browse files
Options
Downloads
Patches
Plain Diff
files correct plots and division bugs
parent
4f9658c2
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
hp4155/ADU/ADU_interface.ipynb
+7
-6
7 additions, 6 deletions
hp4155/ADU/ADU_interface.ipynb
hp4155/ADU/ADU_version_2.py
+6
-6
6 additions, 6 deletions
hp4155/ADU/ADU_version_2.py
hp4155/ADU/lib/help.py
+85
-81
85 additions, 81 deletions
hp4155/ADU/lib/help.py
with
98 additions
and
93 deletions
hp4155/ADU/ADU_interface.ipynb
+
7
−
6
View file @
42d87ff0
...
...
@@ -9,7 +9,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
cd40d96f2e7e498a8be2c274b555efc3
",
"model_id": "
e84c398f5e4b4c6492c85132b75c001d
",
"version_major": 2,
"version_minor": 0
},
...
...
@@ -23,7 +23,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
9793c177990f4488a2703415977d430d
",
"model_id": "
bb24cfe2e9f64ddc8cde861e0c3d1850
",
"version_major": 2,
"version_minor": 0
},
...
...
@@ -44,7 +44,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3f
6d6704a6744cc2b10d13efc33ce0f4
",
"model_id": "
4
3f
9e5396de44c668db4f46b2d2659d1
",
"version_major": 2,
"version_minor": 0
},
...
...
@@ -65,7 +65,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
b84095849b4b4e7c87d5b39c2845c9fe
",
"model_id": "
a3e67ffbb7ba45ee9ac284f27cebf835
",
"version_major": 2,
"version_minor": 0
},
...
...
@@ -86,7 +86,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
7be9f0c4ca2647b5a3c759d1f881f3d4
",
"model_id": "
28b8b4d4c13548e3964b10e575e8f8c2
",
"version_major": 2,
"version_minor": 0
},
...
...
@@ -100,7 +100,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
ba3b7e206c7f4618b95a10fb0feb5f1
8",
"model_id": "
02dfd3ebe81a4599a4d72630d5a6422
8",
"version_major": 2,
"version_minor": 0
},
...
...
@@ -113,6 +113,7 @@
}
],
"source": [
"%matplotlib ipympl\n",
"%run ADU_version_2.py"
]
},
...
...
%% Cell type:code id:6defdb49-06c2-469d-beb5-bc2e147e3f79 tags:
```
python
%
matplotlib
ipympl
%
run
ADU_version_2
.
py
```
%% Output
%% Cell type:code id:0331b265-0fe6-4749-ac85-099509f735ea tags:
```
python
```
...
...
This diff is collapsed.
Click to expand it.
hp4155/ADU/ADU_version_2.py
+
6
−
6
View file @
42d87ff0
...
...
@@ -135,9 +135,9 @@ def on_start_clicked(b):
#execute measurement
Vgs
,
Vds
,
Idmm
,
gm
,
Igmm
=
Transfer
(
smu1
,
smu2
,
smu3
,
smu4
,
integration_transfer
.
value
,
norm
,
device
)
Id
=
np
.
array
(
Idmm
)
/
normalization_factor
(
width
)
Ig
=
np
.
array
(
Igmm
)
/
normalization_factor
(
width
)
gm_S
=
np
.
array
(
gm
)
/
normalization_factor
(
width
)
Id
=
np
.
divide
(
Idmm
,
normalization_factor
(
width
)
)
Ig
=
np
.
divide
(
Igmm
,
normalization_factor
(
width
)
)
gm_S
=
np
.
divide
(
gm
,
normalization_factor
(
width
)
)
#plot results
#clear_output()
plot_transfer
(
Vgs
,
Idmm
,
gm
,
points
,
norm_unit
)
...
...
@@ -201,8 +201,8 @@ def on_start_clicked(b):
#execute measurement
Vgs
,
Vds
,
Idmm
,
Igmm
=
Output
(
smu1
,
smu2
,
smu3
,
smu4
,
integration_output
.
value
,
norm
,
device
)
Id
=
np
.
array
(
Idmm
)
/
normalization_factor
(
width
)
Ig
=
np
.
array
(
Igmm
)
/
normalization_factor
(
width
)
Id
=
np
.
divide
(
Idmm
,
normalization_factor
(
width
)
)
Ig
=
np
.
divide
(
Igmm
,
normalization_factor
(
width
)
)
#plot results
#clear_output()
plot_output
(
Vds
,
Idmm
,
Igmm
,
points
,
norm_unit
)
...
...
@@ -249,7 +249,7 @@ def on_start_clicked(b):
smu3
.
update
(
VAR1
=
var1
)
#execute measurement
Vgs
,
Igmm
,
ABSIgmm
=
Gatediode
(
smu1
,
smu3
,
smu4
,
integration_gatediode
.
value
,
norm
,
device
)
Ig
=
np
.
array
(
Igmm
)
/
normalization_factor
(
width
)
Ig
=
np
.
divide
(
Igmm
,
normalization_factor
(
width
)
)
#clear_output()
plot_gatediode
(
Vgs
,
Igmm
,
norm_unit
)
...
...
This diff is collapsed.
Click to expand it.
hp4155/ADU/lib/help.py
+
85
−
81
View file @
42d87ff0
import
matplotlib.pyplot
as
plt
import
numpy
as
np
import
time
from
datetime
import
datetime
import
tkinter
as
tk
from
tkinter
import
filedialog
...
...
@@ -8,7 +10,7 @@ import tkinter.messagebox
import
pandas
as
pd
def
plot_transfer
(
x
,
y1
,
y2
,
curves
,
norm_unit
=
'
mA/mm
'
):
with
plt
.
ion
():
x
=
np
.
array_split
(
x
,
curves
)
y1
=
np
.
array_split
(
y1
,
curves
)
y2
=
np
.
array_split
(
y2
,
curves
)
...
...
@@ -41,14 +43,14 @@ def plot_transfer(x,y1,y2,curves,norm_unit='mA/mm'):
ax2
.
tick_params
(
axis
=
'
y
'
,
labelcolor
=
color
,
which
=
'
both
'
)
# Adding title
plt
.
title
(
'
Transfer Curve
'
,
fontweight
=
"
bold
"
)
fig
.
sup
title
(
'
Transfer Curve
'
,
fontweight
=
"
bold
"
)
# Show plot
display
(
fig
)
plt
.
show
(
block
=
False
)
def
plot_output
(
x
,
y1
,
y2
,
curves
,
norm_unit
=
"
mA/mm
"
):
with
plt
.
ion
():
x
=
np
.
array_split
(
x
,
curves
)
y1
=
np
.
array_split
(
y1
,
curves
)
y2
=
np
.
array_split
(
y2
,
curves
)
...
...
@@ -74,10 +76,11 @@ def plot_output(x,y1,y2,curves,norm_unit = "mA/mm"):
ax2
.
plot
(
x
[
i
],
y2
[
i
],
color
=
color
)
ax2
.
tick_params
(
axis
=
'
y
'
,
labelcolor
=
color
,
which
=
'
both
'
)
plt
.
title
(
"
Output Curve
"
,
fontweight
=
"
bold
"
)
display
(
fig
)
fig
.
sup
title
(
"
Output Curve
"
,
fontweight
=
"
bold
"
)
plt
.
show
(
block
=
False
)
def
plot_gatediode
(
x
,
y
,
norm_unit
=
"
mA/mm
"
):
with
plt
.
ion
():
fig
,
ax1
=
plt
.
subplots
()
color
=
'
tab:red
'
...
...
@@ -93,8 +96,8 @@ def plot_gatediode(x,y,norm_unit = "mA/mm"):
ax1
.
plot
(
x
,
y
,
color
=
color
)
ax1
.
tick_params
(
axis
=
'
y
'
,
labelcolor
=
color
,
which
=
'
both
'
)
plt
.
title
(
'
Gatediode Curve
'
,
fontweight
=
"
bold
"
)
display
(
fig
)
fig
.
sup
title
(
'
Gatediode Curve
'
,
fontweight
=
"
bold
"
)
plt
.
show
(
block
=
False
)
def
number_of_points
(
start
,
step
,
stop
):
...
...
@@ -210,8 +213,9 @@ def create_file(filename):
def
save_to_file
(
measurement
,
file
,
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
"
)
date
=
str
(
datetime
.
today
().
replace
(
microsecond
=
0
))
f
.
write
(
f
"
{
measurement
}
at
{
date
}
"
+
"
\n
"
)
f
.
write
(
f
"
Series:
{
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
"
)
...
...
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