Skip to content
Snippets Groups Projects
Commit 5795f80a authored by Alexandros Asonitis's avatar Alexandros Asonitis
Browse files

Reduction of parameters in the functions part 2 (till output both)

parent cda797e5
No related branches found
No related tags found
No related merge requests found
...@@ -87,13 +87,6 @@ line = widgets.HBox([button,import_ini_button,export_ini_button,replot_button]) ...@@ -87,13 +87,6 @@ line = widgets.HBox([button,import_ini_button,export_ini_button,replot_button])
display(line,output) display(line,output)
device = hp4155a.HP4155a('GPIB0::17::INSTR') device = hp4155a.HP4155a('GPIB0::17::INSTR')
df_transfer =pd.DataFrame()
df_output =pd.DataFrame()
df_gatediode = pd.DataFrame()
points_transfer = 0
points_output = 0
points_gatediode = 0
def on_start_clicked(b): def on_start_clicked(b):
with output: with output:
...@@ -133,7 +126,7 @@ def on_start_clicked(b): ...@@ -133,7 +126,7 @@ def on_start_clicked(b):
points = number_of_points(VDS) points = number_of_points(VDS)
var2=device.var2_dict() #VDS is always used in tranfer curve with the same config var2=device.var2_dict() #Vds_output is always used in tranfer curve with the same config
var2.update( var2.update(
start=Vds_transfer['start'].value, start=Vds_transfer['start'].value,
step=Vds_transfer['step'].value, step=Vds_transfer['step'].value,
...@@ -172,7 +165,7 @@ def on_start_clicked(b): ...@@ -172,7 +165,7 @@ def on_start_clicked(b):
"VAR1":var1, "VAR1":var1,
"VAR2":var2, "VAR2":var2,
"PLOT": plot, # plot in the tool "PLOT": plot, # plot in the tool
"INTEGRATION": integration_transfer.value "INTEGRATION": integration_transfer.value,
} }
#measure (later) #measure (later)
...@@ -181,43 +174,203 @@ def on_start_clicked(b): ...@@ -181,43 +174,203 @@ def on_start_clicked(b):
smu_t.update(vname = 'VTG',iname='ITG',mode = 'COMM',func='CONS') smu_t.update(vname = 'VTG',iname='ITG',mode = 'COMM',func='CONS')
smu_b = device.smu_dict() smu_b = device.smu_dict()
smu_b.update(vname = 'VBG',iname='IBG',mode = 'V',func = 'VAR1') smu_b.update(vname = 'VBG',iname='IBG',mode = 'V',func = 'VAR1')
smu_s = device.smu_dict()
smu_s.update(vname ='VS',iname = 'IS',mode = 'COMM',func='CONS') var1 = device.var1_dict()
var1.update(
mode=Vbg_transfer['hyst'].value,
start=Vbg_transfer['start'].value,
stop=Vbg_transfer['stop'].value,
step=Vbg_transfer['step'].value,
comp =Vbg_transfer['comp'].value,
pcomp=Vbg_transfer['pcomp'].value
)
#define the final dict
meas_dict = {
"SAMPLE":sample_copy
"MAP" : map,
"SMU_T":smu_t,
"SMU_D": smu_d,
"SMU_B":smu_b,
"SMU_S":smu_s,
"VAR1":var1,
"VAR2":var2,
"PLOT": plot, # plot in the tool
"INTEGRATION": integration_transfer.value,
}
#measure (later)
case 'BOTH' if check_values(Vbg_transfer,'synchronous') and check_values(Vds_transfer,'secondary') and check_values(Vtg_transfer,'primary'): case 'BOTH' if check_values(Vbg_transfer,'synchronous') and check_values(Vds_transfer,'secondary') and check_values(Vtg_transfer,'primary'):
df_transfer,points_transfer = Transfer_BOTH(Vtg_transfer,Vbg_transfer,Vds_transfer,integration_transfer.value,sample,device,smu_map,save_plot) smu_t = device.smu_dict()
replot_transfer['x_variable'].options = df_transfer.columns.tolist() smu_t.update(vname = 'VTG',iname='ITG',mode = 'V',func='VAR1')
replot_transfer['y_variable'].options = df_transfer.columns.tolist() smu_b = device.smu_dict()
replot_transfer['x_variable'].value = 'VBG/V' smu_b.update(vname = 'VBG',iname='IBG',mode = 'V',func = 'VARD')
replot_transfer['y_variable'].value = 'IDmm/uA/um'
var1 = device.var1_dict()
var1.update(
mode=VTG['hyst'].value,
start=VTG['start'].value,
stop=VTG['stop'].value,
step=VTG['step'].value,
comp =VTG['comp'].value,
pcomp=VTG['pcomp'].value
)
#calculate parameters for VARD
ratio,offset = calculate_line(VTG,VBG)
# update VBG step
Vbg_transfer["step"].value = Decimal(str(ratio)) * Decimal(str(Vtg_transfer["step"].value))
vard = device.vard_dict()
vard.update(
offset = offset,
ratio = ratio,
comp = Vbg_transfer["comp"].value,
pcomp = Vbg_transfer["pcomp"].value,
start = Vbg_transfer["start"].value,
step = Vbg_transfer['step'].value,
stop = Vbg_transfer['stop'].value,
)
#define the final dict
meas_dict = {
"SAMPLE":sample_copy
"MAP" : map,
"SMU_T":smu_t,
"SMU_D": smu_d,
"SMU_B":smu_b,
"SMU_S":smu_s,
"VAR1":var1,
"VAR2":var2,
"PLOT": plot, # plot in the tool
"INTEGRATION": integration_transfer.value,
"VARD":vard
}
#measure (later)
case _ : case _ :
information_box("Transfer Measurement skipped due to invalid parameters") information_box("Transfer Measurement skipped due to invalid parameters")
if output_check.value == True: if output_check.value == True:
smu_d = device.smu_dict()
smu_d.update(vname='VDS',iname='ID',mode = 'V',func = 'VAR1')
var1 = device.var1_dict()
var1.update(
mode=Vds_output['hyst'].value,
start=Vds_output['start'].value,
stop=Vds_output['stop'].value,
step=Vds_output['step'].value,
comp =Vds_output['comp'].value,
pcomp=Vds_output['pcomp'].value
)
plot = plot_output.copy()
for key,value in plot.items():
plot[key] = value.value
match output_gates.value: match output_gates.value:
case 'VTG' if check_values(Vds_output,'primary') and check_values(Vtg_output,'secondary'): case 'VTG' if check_values(Vds_output,'primary') and check_values(Vtg_output,'secondary'):
df_output,points_output = Output_VTG(Vds_output,Vtg_output,integration_output.value,sample,device,smu_map,save_plot) smu_t=device.smu_dict()
replot_output['x_variable'].options = df_output.columns.tolist() smu_t.update(vname ='VTG',iname = 'ITG',mode = 'V',func='VAR2')
replot_output['y_variable'].options = df_output.columns.tolist()
replot_output['x_variable'].value = 'VDS/V' smu_b= device.smu_dict()
replot_output['y_variable'].value = 'IDmm/uA/um' smu_b.update(vname='VBG',iname='IBG',mode = 'COMM',func='CONS')
points = number_of_points(Vtg_output)
var2=device.var2_dict()
var2.update(
start=Vtg_output['start'].value,
step=Vtg_output['step'].value,
points=points,
comp=Vtg_output['comp'].value,
pcomp=Vtg_output['pcomp'].value,
stop = Vtg_output['stop'].value
)
meas_dict = {
"SAMPLE":sample_copy
"MAP" : map,
"SMU_T":smu_t,
"SMU_D": smu_d,
"SMU_B":smu_b,
"SMU_S":smu_s,
"VAR1":var1,
"VAR2":var2,
"PLOT": plot, # plot in the tool
"INTEGRATION": integration_output.value,
}
#measure later
case 'VBG' if check_values(Vds_output,'primary') and check_values(Vbg_output,'secondary'): case 'VBG' if check_values(Vds_output,'primary') and check_values(Vbg_output,'secondary'):
df_output,points_output = Output_VBG(Vds_output,Vbg_output,integration_output.value,sample,device,smu_map,save_plot) smu_t=device.smu_dict()
replot_output['x_variable'].options = df_output.columns.tolist() smu_t.update(vname ='VTG',iname = 'ITG',mode = 'COMM',func='CONS')
replot_output['y_variable'].options = df_output.columns.tolist()
replot_output['x_variable'].value = 'VDS/V' smu_b= device.smu_dict()
replot_output['y_variable'].value = 'IDmm/uA/um' smu_b.update(vname='VBG',iname='IBG',mode = 'V',func = 'VAR2')
points = number_of_points(Vbg_output)
var2=device.var2_dict()
var2.update(
start=Vbg_output['start'].value,
step=Vbg_output['step'].value,
points=points,
comp=Vbg_output['comp'].value,
pcomp=Vbg_output['pcomp'].value,
stop = Vbg_output['stop'].value
)
meas_dict = {
"SAMPLE":sample_copy
"MAP" : map,
"SMU_T":smu_t,
"SMU_D": smu_d,
"SMU_B":smu_b,
"SMU_S":smu_s,
"VAR1":var1,
"VAR2":var2,
"PLOT": plot, # plot in the tool
"INTEGRATION": integration_output.value,
}
#measure later
case 'BOTH' if check_values(Vds_output,'primary') and check_values(Vtg_output,'secondary') and check_values(Vbg_output,'secondary'): case 'BOTH' if check_values(Vds_output,'primary') and check_values(Vtg_output,'secondary') and check_values(Vbg_output,'secondary'):
df_output,points_output = Output_BOTH(Vds_output,Vtg_output,Vbg_output,integration_output.value,sample,device,smu_map,save_plot) smu_t=device.smu_dict()
replot_output['x_variable'].options = df_output.columns.tolist() smu_t.update(vname ='VTG',iname = 'ITG',mode = 'V',func='VAR2')
replot_output['y_variable'].options = df_output.columns.tolist()
replot_output['x_variable'].value = 'VDS/V' smu_b= device.smu_dict()
replot_output['y_variable'].value = 'IDmm/uA/um' smu_b.update(vname='VBG',iname='IBG',mode = 'V',func = 'CONS')
points = number_of_points(Vtg_output)
var2=device.var2_dict()
var2.update(
start=Vtg_output['start'].value,
step=Vtg_output['step'].value,
points=points,
comp=Vtg_output['comp'].value,
pcomp=Vtg_output['pcomp'].value,
stop = Vtg_output['stop'].value
)
points_VBG = number_of_points(Vbg_output)
values_VBG = np.linspace(Vbg_output["start"].value,Vbg_output["stop"].value,num = points_VBG,endpoint= True)
#there is not such unit we create it with a loop
var3 = {
}
case _ : case _ :
information_box("Output Measurement skipped due to invalid parameters") information_box("Output Measurement skipped due to invalid parameters")
df_output = pd.DataFrame()
points_output = 0
if gatediode_check.value == True: if gatediode_check.value == True:
......
...@@ -234,14 +234,3 @@ def check_configuration(smu_map:dict): ...@@ -234,14 +234,3 @@ def check_configuration(smu_map:dict):
if len(map_set)!= len(map_list): #we have duplicates if len(map_set)!= len(map_list): #we have duplicates
raise Exception("You cannot assign a smu to multiple contacts") raise Exception("You cannot assign a smu to multiple contacts")
\ No newline at end of file
This diff is collapsed.
%% Cell type:code id:81f37cac-ea14-4540-8bc9-78bee248dfbb tags: %% Cell type:code id:81f37cac-ea14-4540-8bc9-78bee248dfbb tags:
``` python ``` python
import sys import sys
sys.path.insert(0, './lib') sys.path.insert(0, './lib')
sys.path.insert(0, '..') #append parent directory sys.path.insert(0, '..') #append parent directory
from interface import * from interface import *
from help import * from help import *
``` ```
%% Cell type:code id:731635ba-6f97-4a65-ad78-ae90b277544b tags: %% Cell type:code id:731635ba-6f97-4a65-ad78-ae90b277544b tags:
``` python ``` python
# Create the grids # Create the grids
#create the information grid #create the information grid
style = {'description_width': 'initial'} style = {'description_width': 'initial'}
sample,smu_map = information_box_new() sample,smu_map = information_box_new()
###end of sampling information####################################### ###end of sampling information#######################################
# move checkboxes outside of the tabs # move checkboxes outside of the tabs
transfer_check,integration_transfer,transfer_gates = header('Transfer Curve',"MEDium") transfer_check,integration_transfer,transfer_gates = header('Transfer Curve',"MEDium")
output_check,integration_output,output_gates = header('Output Curve',"SHORt") output_check,integration_output,output_gates = header('Output Curve',"SHORt")
gatediode_check,integration_gatediode,_=header('Gatediode',"MEDium") gatediode_check,integration_gatediode,_=header('Gatediode',"MEDium")
checkboxes = widgets.HBox([transfer_check,output_check,gatediode_check]) checkboxes = widgets.HBox([transfer_check,output_check,gatediode_check])
display(checkboxes) display(checkboxes)
#transfer #transfer
Vds_transfer_widgets,Vds_transfer = secondary('VDS',0.05,0.95,1,1e-2) Vds_transfer_widgets,Vds_transfer = secondary('VDS',0.05,0.95,1,1e-2)
Vtg_transfer_widgets,Vtg_transfer = primary('VTG',-5,0.01,5,1e-3) Vtg_transfer_widgets,Vtg_transfer = primary('VTG',-5,0.01,5,1e-3)
Vbg_transfer_widgets,Vbg_transfer = synchronous('VBG',-15,0.1,15,1e-3) Vbg_transfer_widgets,Vbg_transfer = synchronous('VBG',-15,0.1,15,1e-3)
plot_transfer_widgets,plot_transfer = plot_config(1,"VTG","IDmm") plot_transfer_widgets,plot_transfer = plot_config(1,"VTG","IDmm")
transfer_box = widgets.VBox([integration_transfer,transfer_gates,Vds_transfer_widgets,Vtg_transfer_widgets,Vbg_transfer_widgets,plot_transfer_widgets]) transfer_box = widgets.VBox([integration_transfer,transfer_gates,Vds_transfer_widgets,Vtg_transfer_widgets,Vbg_transfer_widgets,plot_transfer_widgets])
#output #output
Vds_output_widgets,Vds_output = primary('VDS',0,0.01,5,1e-2) Vds_output_widgets,Vds_output = primary('VDS',0,0.01,5,1e-2)
Vtg_output_widgets,Vtg_output = secondary('VTG',-5,2,5,1e-3) Vtg_output_widgets,Vtg_output = secondary('VTG',-5,2,5,1e-3)
Vbg_output_widgets,Vbg_output = additional_secondary('VBG',-15,5,15,1e-3) Vbg_output_widgets,Vbg_output = additional_secondary('VBG',-15,5,15,1e-3)
plot_output_widgets,plot_output = plot_config(2,"VDS","IDmm") plot_output_widgets,plot_output = plot_config(2,"VDS","IDmm")
output_box = widgets.VBox([integration_output,output_gates,Vds_output_widgets,Vtg_output_widgets,Vbg_output_widgets,plot_output_widgets]) output_box = widgets.VBox([integration_output,output_gates,Vds_output_widgets,Vtg_output_widgets,Vbg_output_widgets,plot_output_widgets])
#GateDiodde #GateDiodde
terminal = widgets.Dropdown( terminal = widgets.Dropdown(
options = ['VTG','VBG'], options = ['VTG','VBG'],
description = 'Selected Gate:', description = 'Selected Gate:',
value ='VTG', value ='VTG',
style= {'description_width': 'initial'} style= {'description_width': 'initial'}
) )
Vg_gatediode_widgets,Vg_gatediode=primary('VG',-5,0.05,5,1e-3) Vg_gatediode_widgets,Vg_gatediode=primary('VG',-5,0.05,5,1e-3)
plot_gatediode_widgets,plot_gatediode = plot_config(3,"VTG","ITGmm") plot_gatediode_widgets,plot_gatediode = plot_config(3,"VTG","ITGmm")
gatediode_box = widgets.VBox([integration_gatediode,terminal,Vg_gatediode_widgets,plot_gatediode_widgets]) gatediode_box = widgets.VBox([integration_gatediode,terminal,Vg_gatediode_widgets,plot_gatediode_widgets])
#replot #replot
replot_transfer_widgets,replot_transfer= replot("Transfer") replot_transfer_widgets,replot_transfer= replot("Transfer")
#the tab widget #the tab widget
children = [transfer_box,output_box,gatediode_box,replot_transfer_widgets] children = [transfer_box,output_box,gatediode_box,replot_transfer_widgets]
titles = ["Transfer","Output","Gatediode","Replot"] titles = ["Transfer","Output","Gatediode","Replot"]
tab = widgets.Tab() tab = widgets.Tab()
tab.children = children tab.children = children
tab.titles = titles tab.titles = titles
display(tab) display(tab)
button = widgets.Button(description ='Start Measurement') button = widgets.Button(description ='Start Measurement')
output = widgets.Output() 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')
replot_button = widgets.Button(description = 'Replot',disabled = True) replot_button = widgets.Button(description = 'Replot',disabled = True)
all_widgets =[transfer_gates,output_gates,button,transfer_check,integration_transfer,output_check,integration_output,gatediode_check,integration_gatediode,terminal,export_ini_button,import_ini_button] all_widgets =[transfer_gates,output_gates,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(smu_map,all_widgets) add_widgets_to_list(smu_map,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(Vtg_output,all_widgets) add_widgets_to_list(Vtg_output,all_widgets)
add_widgets_to_list(Vbg_output,all_widgets) add_widgets_to_list(Vbg_output,all_widgets)
add_widgets_to_list(Vg_gatediode,all_widgets) add_widgets_to_list(Vg_gatediode,all_widgets)
line = widgets.HBox([button,import_ini_button,export_ini_button,replot_button]) line = widgets.HBox([button,import_ini_button,export_ini_button,replot_button])
display(line,output) display(line,output)
``` ```
%% Output %% Output
%% Cell type:code id:32d69443-da43-40fd-8f6d-420033be7152 tags: %% Cell type:code id:32d69443-da43-40fd-8f6d-420033be7152 tags:
``` python ``` python
sample_copy = sample.copy() sample_copy = sample.copy()
for key,value in sample_copy.items(): for key,value in sample_copy.items():
sample_copy[key]=value.value sample_copy[key]=value.value
``` ```
%% Cell type:code id:71e8b5eb-f8b1-4d51-98f6-58665c6a5b11 tags: %% Cell type:code id:71e8b5eb-f8b1-4d51-98f6-58665c6a5b11 tags:
``` python ``` python
print(sample_copy) print(sample_copy)
``` ```
%% Output %% Output
{'processing_number': '', 'sample': '', 'field': '', 'device': '', 'width': 100.0, 'save_fig': True} {'processing_number': '', 'sample': '', 'field': '', 'device': '', 'width': 100.0, 'save_fig': True}
%% Cell type:code id:cc5fc69a-294e-4a1c-8267-e196316b6c3b tags: %% Cell type:code id:cc5fc69a-294e-4a1c-8267-e196316b6c3b tags:
``` python ``` python
plot_transfer['y1'].value plot_transfer['y1'].value
``` ```
%% Output %% Output
'Y1' 'IDmm'
%% Cell type:code id:eee00bdc-55e5-466c-89e9-b5836087b1ed tags: %% Cell type:code id:eee00bdc-55e5-466c-89e9-b5836087b1ed tags:
``` python ``` python
``` ```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment