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
7e1febb6
Commit
7e1febb6
authored
1 year ago
by
Alexandros Asonitis
Browse files
Options
Downloads
Patches
Plain Diff
fixed matplotlib bug plotting in transfer curve
parent
ce11987e
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
-8
7 additions, 8 deletions
hp4155/ADU/ADU_interface.ipynb
hp4155/ADU/lib/help.py
+16
-9
16 additions, 9 deletions
hp4155/ADU/lib/help.py
hp4155/hp4155a.py
+0
-2
0 additions, 2 deletions
hp4155/hp4155a.py
with
23 additions
and
19 deletions
hp4155/ADU/ADU_interface.ipynb
+
7
−
8
View file @
7e1febb6
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
e84c398f5e4b4c6492c85132b75c001d
",
"model_id": "
085dce1f59214d188b41662aa105b2d3
",
"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": "
bb24cfe2e9f64ddc8cde861e0c3d1850
",
"model_id": "
f6fd1f84320f406bb08c41951d62bdf5
",
"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": "
43f9e5396de44c668db4f46b2d2659d
1",
"model_id": "
b512386ba3cf42c98b8fd13325cd879
1",
"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": "
a3e67ffbb7ba45ee9ac284f27
cebf
835
",
"model_id": "
e4a53ef64f184afd9e
ce
9
bf
61f16a992
",
"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": "
28b8b4d4c13548e3964b10e575e8f8c2
",
"model_id": "
d142f057b2124fcebe3175fa8971677c
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0
2
df
d3ebe81a4599a4d72630d5a64228
",
"model_id": "0
7
df
3b7af50443eca87e6c8059763b52
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -113,14 +113,13 @@
...
@@ -113,14 +113,13 @@
}
}
],
],
"source": [
"source": [
"%matplotlib ipympl\n",
"%run ADU_version_2.py"
"%run ADU_version_2.py"
]
]
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": null,
"execution_count": null,
"id": "
0331b265-0fe6-4749-ac85-099509f735ea
",
"id": "
d480980e-f36a-4096-89b0-f65fe874d8a6
",
"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
%
matplotlib
ipympl
%
run
ADU_version_2
.
py
%
run
ADU_version_2
.
py
```
```
%% Output
%% Output
%% Cell type:code id:
0331b265-0fe6-4749-ac85-099509f735ea
tags:
%% Cell type:code id:
d480980e-f36a-4096-89b0-f65fe874d8a6
tags:
```
python
```
python
```
```
...
...
This diff is collapsed.
Click to expand it.
hp4155/ADU/lib/help.py
+
16
−
9
View file @
7e1febb6
...
@@ -27,7 +27,7 @@ def plot_transfer(x,y1,y2,curves,norm_unit='mA/mm'):
...
@@ -27,7 +27,7 @@ def plot_transfer(x,y1,y2,curves,norm_unit='mA/mm'):
for
i
in
range
(
curves
):
for
i
in
range
(
curves
):
ax1
.
plot
(
x
[
i
],
y1
[
i
],
color
=
color
)
ax1
.
plot
(
x
[
i
],
y1
[
i
],
color
=
color
)
#ax1.plot(Vgs, Idmm, color = color)
#ax1.plot(Vgs, Idmm, color = color)
ax1
.
tick_params
(
axis
=
'
y
'
,
labelcolor
=
color
,
which
=
'
both
'
)
ax1
.
tick_params
(
axis
=
'
y
'
,
labelcolor
=
color
)
# Adding Twin Axes
# Adding Twin Axes
ax2
=
ax1
.
twinx
()
ax2
=
ax1
.
twinx
()
...
@@ -37,13 +37,15 @@ def plot_transfer(x,y1,y2,curves,norm_unit='mA/mm'):
...
@@ -37,13 +37,15 @@ def plot_transfer(x,y1,y2,curves,norm_unit='mA/mm'):
ax2
.
set_ylabel
(
'
$g_{m} (mS/mm)$
'
,
color
=
color
)
ax2
.
set_ylabel
(
'
$g_{m} (mS/mm)$
'
,
color
=
color
)
else
:
else
:
ax2
.
set_ylabel
(
'
$g_{m} (uS/um)$
'
,
color
=
color
)
ax2
.
set_ylabel
(
'
$g_{m} (uS/um)$
'
,
color
=
color
)
for
i
in
range
(
curves
):
for
i
in
range
(
curves
):
ax
1
.
plot
(
x
[
i
],
y2
[
i
],
color
=
color
)
ax
2
.
plot
(
x
[
i
],
y2
[
i
],
color
=
color
)
#ax2.plot(Vgs, gm, color = color)
#ax2.plot(Vgs, gm, color = color)
ax2
.
tick_params
(
axis
=
'
y
'
,
labelcolor
=
color
,
which
=
'
both
'
)
ax2
.
tick_params
(
axis
=
'
y
'
,
labelcolor
=
color
)
# Adding title
# Adding title
fig
.
suptitle
(
'
Transfer Curve
'
,
fontweight
=
"
bold
"
)
fig
.
suptitle
(
'
Transfer Curve
'
,
fontweight
=
"
bold
"
)
fig
.
tight_layout
()
# Show plot
# Show plot
display
(
fig
)
display
(
fig
)
...
@@ -62,9 +64,10 @@ def plot_output(x,y1,y2,curves,norm_unit = "mA/mm"):
...
@@ -62,9 +64,10 @@ def plot_output(x,y1,y2,curves,norm_unit = "mA/mm"):
ax1
.
set_ylabel
(
'
$I_{D} (mA/mm)$
'
,
color
=
color
)
ax1
.
set_ylabel
(
'
$I_{D} (mA/mm)$
'
,
color
=
color
)
else
:
else
:
ax1
.
set_ylabel
(
'
$I_{D} (uA/um)$
'
,
color
=
color
)
ax1
.
set_ylabel
(
'
$I_{D} (uA/um)$
'
,
color
=
color
)
for
i
in
range
(
curves
):
for
i
in
range
(
curves
):
ax1
.
plot
(
x
[
i
],
y1
[
i
],
color
=
color
)
ax1
.
plot
(
x
[
i
],
y1
[
i
],
color
=
color
)
ax1
.
tick_params
(
axis
=
'
y
'
,
labelcolor
=
color
,
which
=
'
both
'
)
ax1
.
tick_params
(
axis
=
'
y
'
,
labelcolor
=
color
)
ax2
=
ax1
.
twinx
()
ax2
=
ax1
.
twinx
()
color
=
'
tab:green
'
color
=
'
tab:green
'
...
@@ -72,11 +75,14 @@ def plot_output(x,y1,y2,curves,norm_unit = "mA/mm"):
...
@@ -72,11 +75,14 @@ def plot_output(x,y1,y2,curves,norm_unit = "mA/mm"):
ax2
.
set_ylabel
(
'
$I_{G} (mA/mm)$
'
,
color
=
color
)
ax2
.
set_ylabel
(
'
$I_{G} (mA/mm)$
'
,
color
=
color
)
else
:
else
:
ax2
.
set_ylabel
(
'
$I_{G} (uA/um)$
'
,
color
=
color
)
ax2
.
set_ylabel
(
'
$I_{G} (uA/um)$
'
,
color
=
color
)
for
i
in
range
(
curves
):
for
i
in
range
(
curves
):
ax2
.
plot
(
x
[
i
],
y2
[
i
],
color
=
color
)
ax2
.
plot
(
x
[
i
],
y2
[
i
],
color
=
color
)
ax2
.
tick_params
(
axis
=
'
y
'
,
labelcolor
=
color
,
which
=
'
both
'
)
ax2
.
tick_params
(
axis
=
'
y
'
,
labelcolor
=
color
)
fig
.
suptitle
(
"
Output Curve
"
,
fontweight
=
"
bold
"
)
fig
.
suptitle
(
"
Output Curve
"
,
fontweight
=
"
bold
"
)
fig
.
tight_layout
()
display
(
fig
)
display
(
fig
)
def
plot_gatediode
(
x
,
y
,
norm_unit
=
"
mA/mm
"
):
def
plot_gatediode
(
x
,
y
,
norm_unit
=
"
mA/mm
"
):
...
@@ -93,9 +99,10 @@ def plot_gatediode(x,y,norm_unit = "mA/mm"):
...
@@ -93,9 +99,10 @@ def plot_gatediode(x,y,norm_unit = "mA/mm"):
y
=
np
.
absolute
(
y
)
y
=
np
.
absolute
(
y
)
ax1
.
plot
(
x
,
y
,
color
=
color
)
ax1
.
plot
(
x
,
y
,
color
=
color
)
ax1
.
tick_params
(
axis
=
'
y
'
,
labelcolor
=
color
,
which
=
'
both
'
)
ax1
.
tick_params
(
axis
=
'
y
'
,
labelcolor
=
color
)
fig
.
suptitle
(
'
Gatediode Curve
'
,
fontweight
=
"
bold
"
)
fig
.
suptitle
(
'
Gatediode Curve
'
,
fontweight
=
"
bold
"
)
fig
.
tight_layout
()
display
(
fig
)
display
(
fig
)
...
...
This diff is collapsed.
Click to expand it.
hp4155/hp4155a.py
+
0
−
2
View file @
7e1febb6
...
@@ -174,8 +174,6 @@ class HP4155a(object):
...
@@ -174,8 +174,6 @@ class HP4155a(object):
command
=
command
+
f
"
{
repr
(
variable
)
}
"
command
=
command
+
f
"
{
repr
(
variable
)
}
"
if
index
!=
len
(
variables_list
)
-
1
:
if
index
!=
len
(
variables_list
)
-
1
:
command
=
command
+
"
,
"
command
=
command
+
"
,
"
#test
print
(
command
)
self
.
inst
.
write
(
command
)
self
.
inst
.
write
(
command
)
...
...
This diff is collapsed.
Click to expand it.
Alexandros Asonitis
@asoalexandros
·
1 year ago
Author
Developer
To be sent to the release version
To be sent to the release version
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