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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CST
labcode
Commits
b5cef3ec
Commit
b5cef3ec
authored
1 month ago
by
Alexandros Asonitis
Browse files
Options
Downloads
Patches
Plain Diff
retrieving parameters from interface part 2
parent
34a7c63b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hp4155/Custom_SMU/main.py
+31
-4
31 additions, 4 deletions
hp4155/Custom_SMU/main.py
hp4155/Custom_SMU/test_interface.ipynb
+4
-4
4 additions, 4 deletions
hp4155/Custom_SMU/test_interface.ipynb
with
35 additions
and
8 deletions
hp4155/Custom_SMU/main.py
+
31
−
4
View file @
b5cef3ec
...
...
@@ -23,7 +23,6 @@ display(start,output)
def
on_start_clicked
(
b
):
with
output
:
change_state
(
first_page
,
second_page
,
third_page
,
fourth_page
,
fifth_page
)
# Step 1 create the dictionaries
#first page
...
...
@@ -37,7 +36,7 @@ def on_start_clicked(b):
user_functions
=
[]
#iterate over the rows
for
i
in
range
(
1
,
7
):
user_functions
.
append
(
create_dict
(
name
=
second_page
[
i
,
1
].
value
,
unit
=
second_page
[
i
,
2
].
value
,
expression
=
second_page
[
i
,
3
].
value
))
user_functions
.
append
(
create_dict
(
name
=
second_page
[
i
,
0
].
value
,
unit
=
second_page
[
i
,
1
].
value
,
expression
=
second_page
[
i
,
2
].
value
))
# third_page
measurement_mode
=
third_page
[
0
,
0
].
value
...
...
@@ -52,14 +51,42 @@ def on_start_clicked(b):
var1
=
create_dict
(
start
=
third_page
[
4
,
0
].
value
,
stop
=
third_page
[
5
,
0
].
value
,
step
=
third_page
[
6
,
0
].
value
,
comp
=
third_page
[
7
,
0
].
value
,
pcomp
=
third_page
[
8
,
0
].
value
,
mode
=
hyst
)
var2
=
create_dict
(
start
=
third_page
[
4
,
1
].
value
,
stop
=
third_page
[
5
,
1
].
value
,
points
=
third_page
[
6
,
1
].
value
,
comp
=
third_page
[
7
,
1
].
value
,
pcomp
=
third_page
[
8
,
1
])
vard
=
create_dict
(
offset
=
third_page
[
4
,
2
].
value
,
ratio
=
third_page
[
5
,
2
].
value
,
comp
=
third_page
[
7
,
2
].
value
,
third_page
=
[
8
,
2
].
value
)
vard
=
create_dict
(
offset
=
third_page
[
4
,
2
].
value
,
ratio
=
third_page
[
5
,
2
].
value
,
comp
=
third_page
[
7
,
2
].
value
,
pcomp
=
third_page
[
8
,
2
].
value
)
pulse
=
create_dict
(
period
=
third_page
[
4
,
3
].
value
,
width
=
third_page
[
5
,
3
].
value
,
base
=
third_page
[
6
,
3
].
value
)
#sampling parameters
sampling_parameters
=
create_dict
(
mode
=
third_page
[
12
,
0
].
value
,
interval
=
third_page
[
13
,
0
].
value
,
hold
=
third_page
[
16
,
0
].
value
,
points
=
third_page
[
14
,
0
].
value
,
filter
=
third_page
[
17
,
0
].
value
)
sampling_parameters
=
create_dict
(
mode
=
third_page
[
12
,
0
].
value
,
interval
=
third_page
[
13
,
0
].
value
,
hold
=
third_page
[
16
,
0
].
value
,
points
=
third_page
[
14
,
0
].
value
,
filter
=
third_page
[
17
,
0
].
value
)
total_samp_time
=
third_page
[
13
,
0
].
value
# Constant Smus
cons_smus
=
[]
for
j
in
range
(
1
,
5
):
cons_smus
.
append
(
create_dict
(
value
=
third_page
[
21
,
j
].
value
,
comp
=
third_page
[
22
,
j
].
value
))
# Page 4
axes
=
[]
# 0 is x-axis , 1 is y1-axis and 2 is y2-axis
for
j
in
range
(
1
,
4
):
#iterate over the column
axes
.
append
(
create_dict
(
name
=
fourth_page
[
1
,
j
].
value
,
scale
=
fourth_page
[
2
,
j
].
value
,
min
=
fourth_page
[
3
,
j
].
value
,
max
=
fourth_page
[
4
,
j
].
value
))
# Page 5
measurement_name
=
fifth_page
[
0
,
0
].
value
processing_nr
=
fifth_page
[
1
,
0
].
value
sample_series
=
fifth_page
[
2
,
0
].
value
dut
=
fifth_page
[
3
,
0
].
value
variables
=
[]
for
i
in
range
(
8
):
variables
.
append
(
create_dict
(
name
=
fifth_page
[
6
+
i
,
0
].
value
,
unit
=
fifth_page
[
6
+
i
,
1
].
value
))
# Check if the plotted variables are in the save list (later)
start
.
on_click
(
on_start_clicked
)
This diff is collapsed.
Click to expand it.
hp4155/Custom_SMU/test_interface.ipynb
+
4
−
4
View file @
b5cef3ec
...
...
@@ -9,7 +9,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
3d4de39d4bf44f6fb89d0b7a80fa7b9a
",
"model_id": "
97ee283d07e7478bb4b0ff9f9a7bdf58
",
"version_major": 2,
"version_minor": 0
},
...
...
@@ -23,7 +23,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9
115684453914020870eba358d19392e
",
"model_id": "9
082af459043410e9791775d28575cac
",
"version_major": 2,
"version_minor": 0
},
...
...
@@ -37,7 +37,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "
c0511d9c28a24352b0bdc6e97c07c9d1
",
"model_id": "
2b9417b7271b4102822c42e9d7f58e0b
",
"version_major": 2,
"version_minor": 0
},
...
...
@@ -56,7 +56,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "
1af33368-917d-4a4d-b8dd-c89b655a5419
",
"id": "
62768354-a7ff-4f1c-b26a-27fdb88bd545
",
"metadata": {},
"outputs": [],
"source": []
...
...
%% Cell type:code id:a40693da-961a-434d-89f5-6443c0acb517 tags:
```
python
%
run
main
.
py
```
%% Output
%% Cell type:code id:
1af33368-917d-4a4d-b8dd-c89b655a5419
tags:
%% Cell type:code id:
62768354-a7ff-4f1c-b26a-27fdb88bd545
tags:
```
python
```
...
...
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