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
3028143e
Commit
3028143e
authored
1 year ago
by
Alexandros Asonitis
Browse files
Options
Downloads
Patches
Plain Diff
errors in new memristor measurement
parent
6684d293
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/memristor/help.py
+3
-2
3 additions, 2 deletions
hp4155/memristor/help.py
hp4155/memristor/memristor.py
+8
-4
8 additions, 4 deletions
hp4155/memristor/memristor.py
hp4155/memristor/memristor_buttons.ipynb
+4
-4
4 additions, 4 deletions
hp4155/memristor/memristor_buttons.ipynb
with
15 additions
and
10 deletions
hp4155/memristor/help.py
+
3
−
2
View file @
3028143e
...
@@ -302,7 +302,7 @@ def choose_folder():
...
@@ -302,7 +302,7 @@ def choose_folder():
#create or append to file a new measurement(now locally) we dont need that anymore
#create or append to file a new measurement(now locally) we dont need that anymore
!!!
def
create_remote_file
(
sample_series
,
field
,
DUT
,
folder
):
def
create_remote_file
(
sample_series
,
field
,
DUT
,
folder
):
filename
=
f
"
{
sample_series
.
value
}
_
{
field
.
value
}
_
{
DUT
.
value
}
.txt
"
filename
=
f
"
{
sample_series
.
value
}
_
{
field
.
value
}
_
{
DUT
.
value
}
.txt
"
file
=
os
.
path
.
join
(
folder
,
filename
)
#the whole file with location
file
=
os
.
path
.
join
(
folder
,
filename
)
#the whole file with location
...
@@ -323,7 +323,8 @@ def create_remote_file(sample_series,field,DUT,folder):
...
@@ -323,7 +323,8 @@ def create_remote_file(sample_series,field,DUT,folder):
#write the header
#write the header
def
write_header
(
file
):
def
write_header
(
file
,
sample_series
,
field
,
DUT
):
date
=
str
(
datetime
.
today
().
replace
(
microsecond
=
0
))
with
open
(
file
,
'
a
'
)
as
f
:
with
open
(
file
,
'
a
'
)
as
f
:
title
=
f
"
Memristor Measurement
"
+
"
\n\n
"
+
f
"
Sample series:
{
sample_series
.
value
}
"
+
"
\n
"
+
f
"
field:
{
field
.
value
}
"
+
"
\n
"
+
f
"
DUT:
{
DUT
.
value
}
"
+
"
\n
"
+
f
"
Date:
{
date
}
"
+
"
\n\n
"
title
=
f
"
Memristor Measurement
"
+
"
\n\n
"
+
f
"
Sample series:
{
sample_series
.
value
}
"
+
"
\n
"
+
f
"
field:
{
field
.
value
}
"
+
"
\n
"
+
f
"
DUT:
{
DUT
.
value
}
"
+
"
\n
"
+
f
"
Date:
{
date
}
"
+
"
\n\n
"
f
.
write
(
title
)
f
.
write
(
title
)
...
...
This diff is collapsed.
Click to expand it.
hp4155/memristor/memristor.py
+
8
−
4
View file @
3028143e
...
@@ -4,6 +4,9 @@ import ipywidgets as widgets
...
@@ -4,6 +4,9 @@ import ipywidgets as widgets
from
keyboard
import
add_hotkey
,
remove_hotkey
from
keyboard
import
add_hotkey
,
remove_hotkey
#additional variables
#additional variables
first
=
True
#first measurement
first
=
True
#first measurement
"""
"""
...
@@ -210,7 +213,7 @@ def on_set_button_clicked(b):
...
@@ -210,7 +213,7 @@ def on_set_button_clicked(b):
filename
=
f
"
{
sample_series
.
value
}
_
{
field
.
value
}
_
{
DUT
.
value
}
.txt
"
filename
=
f
"
{
sample_series
.
value
}
_
{
field
.
value
}
_
{
DUT
.
value
}
.txt
"
file
=
os
.
path
.
join
(
folder
,
filename
)
file
=
os
.
path
.
join
(
folder
,
filename
)
#write header to temp_file
#write header to temp_file
write_header
(
temp_file
)
write_header
(
temp_file
,
sample_series
,
field
,
DUT
)
first
=
False
first
=
False
...
@@ -259,7 +262,7 @@ def on_reset_button_clicked(b):
...
@@ -259,7 +262,7 @@ def on_reset_button_clicked(b):
filename
=
f
"
{
sample_series
.
value
}
_
{
field
.
value
}
_
{
DUT
.
value
}
.txt
"
filename
=
f
"
{
sample_series
.
value
}
_
{
field
.
value
}
_
{
DUT
.
value
}
.txt
"
file
=
os
.
path
.
join
(
folder
,
filename
)
file
=
os
.
path
.
join
(
folder
,
filename
)
#write header to temp_file
#write header to temp_file
write_header
(
temp_file
)
write_header
(
temp_file
,
sample_series
,
field
,
DUT
)
first
=
False
#set first to false irrelvant if it is in the if statement or not
first
=
False
#set first to false irrelvant if it is in the if statement or not
#check values
#check values
...
@@ -308,7 +311,7 @@ def on_full_button_clicked(b):
...
@@ -308,7 +311,7 @@ def on_full_button_clicked(b):
filename
=
f
"
{
sample_series
.
value
}
_
{
field
.
value
}
_
{
DUT
.
value
}
.txt
"
filename
=
f
"
{
sample_series
.
value
}
_
{
field
.
value
}
_
{
DUT
.
value
}
.txt
"
file
=
os
.
path
.
join
(
folder
,
filename
)
file
=
os
.
path
.
join
(
folder
,
filename
)
#write header to temp_file
#write header to temp_file
write_header
(
temp_file
)
write_header
(
temp_file
,
sample_series
,
field
,
DUT
)
first
=
False
#set first to false irrelvant if it is in the if statement or not
first
=
False
#set first to false irrelvant if it is in the if statement or not
#check values
#check values
...
@@ -373,13 +376,14 @@ def on_full_button_clicked(b):
...
@@ -373,13 +376,14 @@ def on_full_button_clicked(b):
f
.
write
(
df
.
to_string
())
f
.
write
(
df
.
to_string
())
f
.
write
(
"
\n\n
"
)
f
.
write
(
"
\n\n
"
)
#plot results
#plot results
ax1
.
plot
(
V
,
I
)
ax1
.
plot
(
V
,
I
)
ax2
.
plot
(
V
,
np
.
absolute
(
I
))
ax2
.
plot
(
V
,
np
.
absolute
(
I
))
fig
.
tight_layout
()
fig
.
tight_layout
()
#update plot
#update plot
clear_output
(
wait
=
True
)
clear_output
()
#display(fig)
#display(fig)
plt
.
show
()
plt
.
show
()
print
(
df
)
print
(
df
)
...
...
This diff is collapsed.
Click to expand it.
hp4155/memristor/memristor_buttons.ipynb
+
4
−
4
View file @
3028143e
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
4073e2325f9e42e5a2d2b706a9b524e5
",
"model_id": "
acf54d31daa84a9bae0665c1f23c3dd7
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
9397b20eee16483fb27a7ab865796175
",
"model_id": "
0c06b2440f3443aa9aa8d7f3ccee4a4c
",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
{
{
"data": {
"data": {
"application/vnd.jupyter.widget-view+json": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0
6b754ca7a38465baa16a494e77e5932
",
"model_id": "0
8d7f8f067d04518afda74374db4a115
",
"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": "
006a3d9773174d1aa5d4beb71fac795
3",
"model_id": "
a556864b590e4f09a89afa2b6f5e308
3",
"version_major": 2,
"version_major": 2,
"version_minor": 0
"version_minor": 0
},
},
...
...
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