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
57a63d48
Commit
57a63d48
authored
1 year ago
by
Alexandros Asonitis
Browse files
Options
Downloads
Patches
Plain Diff
Double Gate Devices part 4 (Set correct parameters)
parent
161d1d07
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
hp4155/ADU for double gate devices/double_gate_ADU.py
+64
-42
64 additions, 42 deletions
hp4155/ADU for double gate devices/double_gate_ADU.py
hp4155/ADU for double gate devices/lib/help.py
+31
-14
31 additions, 14 deletions
hp4155/ADU for double gate devices/lib/help.py
with
95 additions
and
56 deletions
hp4155/ADU for double gate devices/double_gate_ADU.py
+
64
−
42
View file @
57a63d48
...
@@ -27,20 +27,28 @@ print()
...
@@ -27,20 +27,28 @@ print()
#transfer
#transfer
Vds_transfer_widgets
,
Vds_transfer
=
secondary
(
'
V
ds
'
,
1
,
0
,
1
,
0.1
)
Vds_transfer_widgets
,
Vds_transfer
=
secondary
(
'
V
DS
'
,
1
,
0
,
1
,
0.1
)
Vtg_transfer_widgets
,
Vtg_transfer
=
primary
(
'
V
tg
'
,
-
7
,
0.1
,
7
,
0.01
)
Vtg_transfer_widgets
,
Vtg_transfer
=
primary
(
'
V
TG
'
,
-
7
,
0.1
,
7
,
0.01
)
Vbg_transfer_widgets
,
Vbg_transfer
=
primary
(
'
V
bg
'
,
-
50
,
50
/
7
*
0.1
,
50
,
0.01
)
Vbg_transfer_widgets
,
Vbg_transfer
=
synchronous
(
'
V
BG
'
,
-
50
,
50
,
0.01
)
transfer_box
=
widgets
.
VBox
([
integration_transfer
,
Vds_transfer_widgets
,
Vtg_transfer_widgets
,
Vbg_transfer_widgets
])
transfer_box
=
widgets
.
VBox
([
integration_transfer
,
Vds_transfer_widgets
,
Vtg_transfer_widgets
,
Vbg_transfer_widgets
])
#output
#output
Vds_output_widgets
,
Vds_output
=
primary
(
'
Vds
'
,
0
,
0.1
,
15
,
0.1
)
Vds_output_widgets
,
Vds_output
=
primary
(
'
VDS
'
,
0
,
0.01
,
5
,
0.1
)
Vgs_output_widgets
,
Vgs_output
=
secondary
(
'
Vgs
'
,
2
,
-
1
,
-
8
,
0.01
)
Vtg_output_widgets
,
Vtg_output
=
secondary
(
'
VTG
'
,
1
,
1
,
5
,
0.01
)
output_box
=
widgets
.
VBox
([
integration_output
,
Vds_output_widgets
,
Vgs_output_widgets
])
Vbg_output_widgets
,
Vbg_output
=
additional_secondary
(
'
VBG
'
,
10
,
10
,
20
,
0.01
)
output_box
=
widgets
.
VBox
([
integration_output
,
Vds_output_widgets
,
Vtg_output_widgets
,
Vbg_output_widgets
])
#GateDiodde
#GateDiodde
Vgs_gatediode_widgets
,
Vgs_gatediode
=
primary
(
'
Vgs
'
,
-
8
,
0.05
,
2
,
0.02
)
terminal
=
widgets
.
Dropdown
(
gatediode_box
=
widgets
.
VBox
([
integration_gatediode
,
Vgs_gatediode_widgets
])
options
=
[
'
VTG
'
,
'
VBG
'
],
description
=
'
Selected Gate:
'
,
value
=
'
VTG
'
,
style
=
{
'
description_width
'
:
'
initial
'
}
)
Vg_gatediode_widgets
,
Vg_gatediode
=
primary
(
'
VG
'
,
-
8
,
0.05
,
2
,
0.02
)
gatediode_box
=
widgets
.
VBox
([
integration_gatediode
,
terminal
,
Vgs_gatediode_widgets
])
#the tab widget
#the tab widget
children
=
[
transfer_box
,
output_box
,
gatediode_box
]
children
=
[
transfer_box
,
output_box
,
gatediode_box
]
...
@@ -59,15 +67,16 @@ output = widgets.Output()
...
@@ -59,15 +67,16 @@ output = widgets.Output()
export_ini_button
=
widgets
.
Button
(
description
=
'
Export as ini
'
)
export_ini_button
=
widgets
.
Button
(
description
=
'
Export as ini
'
)
import_ini_button
=
widgets
.
Button
(
description
=
'
Import from ini
'
)
import_ini_button
=
widgets
.
Button
(
description
=
'
Import from ini
'
)
all_widgets
=
[
button
,
transfer_check
,
integration_transfer
,
output_check
,
integration_output
,
gatediode_check
,
integration_gatediode
,
export_ini_button
,
import_ini_button
]
all_widgets
=
[
button
,
transfer_check
,
integration_transfer
,
output_check
,
integration_output
,
gatediode_check
,
integration_gatediode
,
terminal
,
export_ini_button
,
import_ini_button
]
add_widgets_to_list
(
sample
,
all_widgets
)
add_widgets_to_list
(
sample
,
all_widgets
)
add_widgets_to_list
(
Vds_transfer
,
all_widgets
)
add_widgets_to_list
(
Vds_transfer
,
all_widgets
)
add_widgets_to_list
(
Vtg_transfer
,
all_widgets
)
add_widgets_to_list
(
Vtg_transfer
,
all_widgets
)
add_widgets_to_list
(
Vbg_transfer
,
all_widgets
)
add_widgets_to_list
(
Vbg_transfer
,
all_widgets
)
add_widgets_to_list
(
Vds_output
,
all_widgets
)
add_widgets_to_list
(
Vds_output
,
all_widgets
)
add_widgets_to_list
(
Vgs_output
,
all_widgets
)
add_widgets_to_list
(
Vtg_output
,
all_widgets
)
add_widgets_to_list
(
Vgs_gatediode
,
all_widgets
)
add_widgets_to_list
(
Vbg_output
,
all_widgets
)
add_widgets_to_list
(
Vg_gatediode
,
all_widgets
)
line
=
widgets
.
HBox
([
button
,
import_ini_button
,
export_ini_button
])
line
=
widgets
.
HBox
([
button
,
import_ini_button
,
export_ini_button
])
display
(
line
,
output
)
display
(
line
,
output
)
...
@@ -84,16 +93,27 @@ def on_start_clicked(b):
...
@@ -84,16 +93,27 @@ def on_start_clicked(b):
if
transfer_check
.
value
==
True
:
if
transfer_check
.
value
==
True
:
#check the values
#check the values
vg
s
_ok
=
check_values
(
Vtg_transfer
[
'
start
'
],
Vtg_transfer
[
'
step
'
],
Vtg_transfer
[
'
stop
'
]
,
'
primary
'
)
v
t
g_ok
=
check_values
(
Vtg_transfer
,
'
primary
'
)
vds_ok
=
check_values
(
Vds_transfer
[
'
start
'
],
Vds_transfer
[
'
step
'
],
Vds_transfer
[
'
stop
'
]
,
'
secondary
'
)
vds_ok
=
check_values
(
Vds_transfer
,
'
secondary
'
)
if
vg
s
_ok
==
True
and
vds_ok
==
True
:
if
v
t
g_ok
==
True
and
vds_ok
==
True
:
#calculate number of points for var2(VDS)
#calculate number of points for var2(VDS)
points
=
number_of_points
(
Vds_transfer
[
'
start
'
],
Vds_transfer
[
'
step
'
],
Vds_transfer
[
'
stop
'
])
points
=
number_of_points
(
Vds_transfer
[
'
start
'
],
Vds_transfer
[
'
step
'
],
Vds_transfer
[
'
stop
'
])
#configure smus
#configure smus
smu1
=
device
.
smu_dict
()
smu1
=
device
.
smu_dict
()
smu1
.
update
(
vname
=
'
VTG
'
,
iname
=
'
ITG
'
,
mode
=
'
COMM
'
,
func
=
'
CONS
'
)
smu1
.
update
(
vname
=
'
VTG
'
,
iname
=
'
ITG
'
,
mode
=
'
V
'
,
func
=
'
VAR1
'
)
var1
=
device
.
var1_dict
()
var1
.
update
(
mode
=
Vtg_transfer
[
'
hyst
'
].
value
,
start
=
Vtg_transfer
[
'
start
'
].
value
,
stop
=
Vtg_transfer
[
'
stop
'
].
value
,
step
=
Vtg_transfer
[
'
step
'
].
value
,
comp
=
Vtg_transfer
[
'
comp
'
].
value
,
pcomp
=
Vtg_transfer
[
'
pcomp
'
].
value
)
smu1
.
update
(
VAR1
=
var1
)
smu2
=
device
.
smu_dict
()
smu2
=
device
.
smu_dict
()
smu2
.
update
(
vname
=
'
VDS
'
,
iname
=
'
ID
'
,
mode
=
'
V
'
,
func
=
'
VAR2
'
)
smu2
.
update
(
vname
=
'
VDS
'
,
iname
=
'
ID
'
,
mode
=
'
V
'
,
func
=
'
VAR2
'
)
...
@@ -108,28 +128,22 @@ def on_start_clicked(b):
...
@@ -108,28 +128,22 @@ def on_start_clicked(b):
smu2
.
update
(
VAR2
=
var2
)
smu2
.
update
(
VAR2
=
var2
)
smu3
=
device
.
smu_dict
()
smu3
=
device
.
smu_dict
()
smu3
.
update
(
vname
=
'
VBG
'
,
iname
=
'
IBG
'
,
mode
=
'
V
'
,
func
=
'
VAR1
'
)
smu3
.
update
(
vname
=
'
VBG
'
,
iname
=
'
IBG
'
,
mode
=
'
V
'
,
func
=
'
VARD
'
)
var1
=
device
.
var1_dict
()
vard
=
device
.
vard_dict
()
var1
.
update
(
ratio
,
offset
=
calcualte_line
(
Vtg_transfer
,
Vbg_transfer
)
mode
=
Vtg_transfer
[
'
hyst
'
].
value
,
vard
.
update
(
start
=
Vtg_transfer
[
'
start
'
].
value
,
offset
=
offset
,
stop
=
Vtg_transfer
[
'
stop
'
].
value
,
ratio
=
ratio
,
step
=
Vtg_transfer
[
'
step
'
].
value
,
comp
=
Vbg_transfer
[
'
comp
'
].
value
,
comp
=
Vtg_transfer
[
'
comp
'
].
value
,
pcomp
=
Vbg_transfer
[
'
pcomp
'
].
value
pcomp
=
Vtg_transfer
[
'
pcomp
'
].
value
)
)
smu3
.
update
(
VAR1
=
var1
)
smu4
=
device
.
smu_dict
()
smu4
=
device
.
smu_dict
()
smu4
.
update
(
vname
=
'
VS
'
,
iname
=
'
IS
'
,
mode
=
'
COMM
'
,
func
=
'
CONS
'
)
smu4
.
update
(
vname
=
'
VS
'
,
iname
=
'
IS
'
,
mode
=
'
COMM
'
,
func
=
'
CONS
'
)
#execute measurement
#execute measurement
values
=
Transfer
(
smu1
,
smu2
,
smu3
,
smu4
,
integration_transfer
.
value
,
norm
,
device
)
values
=
Transfer
(
smu1
,
smu2
,
smu3
,
smu4
,
integration_transfer
.
value
,
norm
,
device
)
#Id = np.divide(Idmm,normalization_factor(width))
#Ig = np.divide(Igmm,normalization_factor(width))
#gm_S = np.divide(gm,normalization_factor(width))
#plot results
#plot results
#clear_output()
plot_transfer
(
values
[
"
VGS
"
],
values
[
"
IDmm
"
],
values
[
"
Gmmm
"
],
points
,
norm_unit
)
plot_transfer
(
values
[
"
VGS
"
],
values
[
"
IDmm
"
],
values
[
"
Gmmm
"
],
points
,
norm_unit
)
#save results
#save results
if
norm_unit
==
'
mA/mm
'
:
if
norm_unit
==
'
mA/mm
'
:
...
@@ -146,23 +160,24 @@ def on_start_clicked(b):
...
@@ -146,23 +160,24 @@ def on_start_clicked(b):
df
.
to_csv
(
file
,
sep
=
"
"
,
mode
=
'
a
'
)
df
.
to_csv
(
file
,
sep
=
"
"
,
mode
=
'
a
'
)
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
,
'
primary
'
)
vgs_ok
=
check_values
(
Vgs_output
[
'
start
'
],
Vgs_output
[
'
step
'
],
Vgs_output
[
'
stop
'
],
'
secondary
'
)
vtg_ok
=
check_values
(
Vtg_output
,
'
secondary
'
)
vbg_ok
=
check_values
(
Vbg_output
,
'
secondary
'
)
if
vds_ok
==
True
and
vg
s
_ok
==
True
:
if
vds_ok
==
True
and
v
bg_ok
==
True
and
vt
g_ok
==
True
:
#calculate number of points for var2(VGS)
#calculate number of points for var2(VGS)
points
=
number_of_points
(
Vg
s
_output
[
'
start
'
],
Vg
s
_output
[
'
step
'
],
Vg
s
_output
[
'
stop
'
])
points
=
number_of_points
(
V
t
g_output
[
'
start
'
],
V
t
g_output
[
'
step
'
],
V
t
g_output
[
'
stop
'
])
#configure smus
#configure smus
smu1
=
device
.
smu_dict
()
smu1
=
device
.
smu_dict
()
smu1
.
update
(
vname
=
'
V
S1
'
,
iname
=
'
I
S1
'
,
mode
=
'
COMM
'
,
func
=
'
CONS
'
)
smu1
.
update
(
vname
=
'
V
TG
'
,
iname
=
'
I
TG
'
,
mode
=
'
V
'
,
func
=
'
VAR2
'
)
smu2
=
device
.
smu_dict
()
smu2
=
device
.
smu_dict
()
smu2
.
update
(
vname
=
'
VDS
'
,
iname
=
'
ID
'
,
mode
=
'
V
'
,
func
=
'
VAR1
'
)
smu2
.
update
(
vname
=
'
VDS
'
,
iname
=
'
ID
'
,
mode
=
'
V
'
,
func
=
'
VAR1
'
)
smu3
=
device
.
smu_dict
()
smu3
=
device
.
smu_dict
()
smu3
.
update
(
vname
=
'
VGS
'
,
iname
=
'
IG
'
,
mode
=
'
V
'
,
func
=
'
VAR2
'
)
smu3
.
update
(
vname
=
'
VGS
'
,
iname
=
'
IG
'
,
mode
=
'
V
'
,
func
=
'
CONS
'
)
smu4
=
device
.
smu_dict
()
smu4
=
device
.
smu_dict
()
smu4
.
update
(
vname
=
'
VS2
'
,
iname
=
'
IS2
'
,
mode
=
'
COMM
'
,
func
=
'
CONS
'
)
smu4
.
update
(
vname
=
'
VS2
'
,
iname
=
'
IS2
'
,
mode
=
'
COMM
'
,
func
=
'
CONS
'
)
...
@@ -170,8 +185,8 @@ def on_start_clicked(b):
...
@@ -170,8 +185,8 @@ def on_start_clicked(b):
#set var1(Vds) and var2(Vfs)
#set var1(Vds) and var2(Vfs)
var2
=
device
.
var2_dict
()
var2
=
device
.
var2_dict
()
var2
.
update
(
var2
.
update
(
start
=
Vg
s
_output
[
'
start
'
].
value
,
start
=
V
t
g_output
[
'
start
'
].
value
,
step
=
Vg
s
_output
[
'
step
'
].
value
,
step
=
V
t
g_output
[
'
step
'
].
value
,
points
=
points
,
points
=
points
,
comp
=
Vgs_output
[
'
comp
'
].
value
,
comp
=
Vgs_output
[
'
comp
'
].
value
,
pcomp
=
Vgs_output
[
'
pcomp
'
].
value
pcomp
=
Vgs_output
[
'
pcomp
'
].
value
...
@@ -187,7 +202,14 @@ def on_start_clicked(b):
...
@@ -187,7 +202,14 @@ def on_start_clicked(b):
)
)
smu2
.
update
(
VAR1
=
var1
)
smu2
.
update
(
VAR1
=
var1
)
smu3
.
update
(
VAR2
=
var2
)
smu1
.
update
(
VAR2
=
var2
)
smu3
.
update
(
start
=
Vbg_output
[
'
start
'
].
value
,
step
=
Vbg_output
[
'
step
'
].
value
,
stop
=
Vbg_output
[
'
stop
'
].
value
,
comp
=
Vbg_output
[
'
comp
'
].
value
cons
=
device
.
cons_smu_dict
().
update
(
value
=
start
,
comp
=
comp
)
)
#execute measurement
#execute measurement
values
=
Output
(
smu1
,
smu2
,
smu3
,
smu4
,
integration_output
.
value
,
norm
,
device
)
values
=
Output
(
smu1
,
smu2
,
smu3
,
smu4
,
integration_output
.
value
,
norm
,
device
)
...
@@ -211,9 +233,9 @@ def on_start_clicked(b):
...
@@ -211,9 +233,9 @@ def on_start_clicked(b):
if
gatediode_check
.
value
==
True
:
if
gatediode_check
.
value
==
True
:
#check the values
#check the values
vg
s
_ok
=
check_values
(
Vg
s
_gatediode
[
'
start
'
],
Vgs_gatediode
[
'
step
'
],
Vgs_gatediode
[
'
stop
'
]
,
'
primary
'
)
vg_ok
=
check_values
(
Vg_gatediode
,
'
primary
'
)
if
vg
s
_ok
==
True
:
if
vg_ok
==
True
:
#configure smus
#configure smus
smu1
=
device
.
smu_dict
()
smu1
=
device
.
smu_dict
()
smu1
.
update
(
vname
=
'
VS1
'
,
iname
=
'
IS1
'
,
mode
=
'
COMM
'
,
func
=
'
CONS
'
)
smu1
.
update
(
vname
=
'
VS1
'
,
iname
=
'
IS1
'
,
mode
=
'
COMM
'
,
func
=
'
CONS
'
)
...
@@ -222,7 +244,7 @@ def on_start_clicked(b):
...
@@ -222,7 +244,7 @@ def on_start_clicked(b):
smu3
.
update
(
vname
=
'
VGS
'
,
iname
=
'
IG
'
,
mode
=
'
V
'
,
func
=
'
VAR1
'
)
smu3
.
update
(
vname
=
'
VGS
'
,
iname
=
'
IG
'
,
mode
=
'
V
'
,
func
=
'
VAR1
'
)
smu4
=
device
.
smu_dict
()
smu4
=
device
.
smu_dict
()
smu4
.
update
(
vname
=
'
VS
2
'
,
iname
=
'
IS
2
'
,
mode
=
'
COMM
'
,
func
=
'
CONS
'
)
smu4
.
update
(
vname
=
'
VS
'
,
iname
=
'
IS
'
,
mode
=
'
COMM
'
,
func
=
'
CONS
'
)
var1
=
device
.
var1_dict
()
var1
=
device
.
var1_dict
()
var1
.
update
(
var1
.
update
(
...
...
This diff is collapsed.
Click to expand it.
hp4155/ADU for double gate devices/lib/help.py
+
31
−
14
View file @
57a63d48
...
@@ -122,7 +122,7 @@ def number_of_points(start,step,stop):
...
@@ -122,7 +122,7 @@ def number_of_points(start,step,stop):
points
=
128
points
=
128
return
points
return
points
def
check_values
(
start
,
step
,
stop
,
function
):
def
check_values
(
dictionary
,
function
):
valid
=
True
valid
=
True
root
=
tk
.
Tk
()
root
=
tk
.
Tk
()
...
@@ -132,32 +132,41 @@ def check_values(start,step,stop,function):
...
@@ -132,32 +132,41 @@ def check_values(start,step,stop,function):
root
.
attributes
(
"
-topmost
"
,
True
)
#window stays above all other applications
root
.
attributes
(
"
-topmost
"
,
True
)
#window stays above all other applications
if
function
==
'
primary
'
:
if
function
==
'
primary
'
:
if
abs
(
step
.
value
)
>
abs
(
stop
.
value
-
start
.
value
)
or
step
.
value
==
0
:
#invalid parameter setting
if
abs
(
dictionary
[
'
step
'
]
.
value
)
>
abs
(
dictionary
[
'
stop
'
]
.
value
-
dictionary
.[
'
start
'
]
.
value
)
or
dictionary
[
'
step
'
]
.
value
==
0
:
#invalid parameter setting
valid
=
False
valid
=
False
tkinter
.
messagebox
.
showerror
(
message
=
"
Invalid parameter setting!
"
)
tkinter
.
messagebox
.
showerror
(
message
=
"
Invalid parameter setting!
"
)
if
start
.
value
<
stop
.
value
and
step
.
value
<
0
:
#change polarity
if
dictionary
[
'
start
'
]
.
value
<
dictionary
[
'
step
'
].
value
and
dictionary
[
'
step
'
]
.
value
<
0
:
#change polarity
step
.
value
=
(
-
1
)
*
step
.
value
dictionary
[
'
step
'
]
.
value
=
(
-
1
)
*
dictionary
[
'
step
'
]
.
value
elif
start
.
value
>
stop
.
value
and
step
.
value
>
0
:
elif
dictionary
[
'
start
'
]
.
value
>
dictionary
[
'
stop
'
]
.
value
and
dictionary
[
'
step
'
]
.
value
>
0
:
step
.
value
=
(
-
1
)
*
step
.
value
dictionary
[
'
step
'
]
.
value
=
(
-
1
)
*
dictionary
[
'
step
'
]
.
value
else
:
else
:
pass
pass
if
function
==
'
secondary
'
:
if
function
==
'
secondary
'
:
if
start
.
value
==
stop
.
value
:
if
dictionary
[
'
start
'
]
.
value
==
dictionary
[
'
stop
'
]
.
value
:
pass
pass
elif
abs
(
step
.
value
)
>
abs
(
stop
.
value
-
start
.
value
)
or
step
.
value
==
0
:
#invalid parameter setting
elif
abs
(
dictionary
[
'
step
'
]
.
value
)
>
abs
(
dictionary
[
'
stop
'
]
.
value
-
dictionary
.[
'
start
'
]
.
value
)
or
dictionary
[
'
step
'
]
.
value
==
0
:
#invalid parameter setting
valid
=
False
valid
=
False
tkinter
.
messagebox
.
showerror
(
message
=
"
Invalid parameter setting!
"
)
tkinter
.
messagebox
.
showerror
(
message
=
"
Invalid parameter setting!
"
)
if
start
.
value
<
stop
.
value
and
step
.
value
<
0
:
#change polarity
if
dictionary
[
'
start
'
].
value
<
dictionary
[
'
step
'
].
value
and
dictionary
[
'
step
'
].
value
<
0
:
#change polarity
step
.
value
=
(
-
1
)
*
step
.
value
dictionary
[
'
step
'
].
value
=
(
-
1
)
*
dictionary
[
'
step
'
].
value
elif
start
.
value
>
stop
.
value
and
step
.
value
>
0
:
elif
dictionary
[
'
start
'
].
value
>
dictionary
[
'
stop
'
].
value
and
dictionary
[
'
step
'
].
value
>
0
:
step
.
value
=
(
-
1
)
*
step
.
value
dictionary
[
'
step
'
].
value
=
(
-
1
)
*
dictionary
[
'
step
'
].
value
if
valid
==
True
:
#check compliance
comp
=
dictionary
[
'
comp
'
].
value
start
=
dictionary
[
'
start
'
].
value
stop
=
dictionary
[
'
stop
'
].
value
try
:
# it is possible that the dictionary does not support power compliance (constant)
pcomp
=
dictionary
[
'
comp
'
].
value
if
max
(
abs
(
comp
*
start
),
abs
(
comp
*
stop
))
>
2
and
pcomp
==
0
:
dictionary
[
'
pcomp
'
].
value
=
2
root
.
destroy
()
root
.
destroy
()
return
valid
return
valid
...
@@ -294,3 +303,11 @@ def load_ini():
...
@@ -294,3 +303,11 @@ def load_ini():
root
.
destroy
()
root
.
destroy
()
return
file
return
file
# function to return ratio and offset for synchronous sweep measurement
def
calculate_line
(
VTG
,
VBG
):
ratio
=
(
VBG
[
'
stop
'
].
value
-
VBG
[
'
start
'
].
value
)
/
(
VTG
[
'
stop
'
].
value
-
VTG
[
'
start
'
].
value
)
offset
=
VBG
[
'
start
'
].
value
-
ratio
*
VTG
[
'
start
'
].
value
return
ratio
,
offset
\ No newline at end of file
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