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

Debugging Double Gate part 3 Output Gatediode and First Replot

parent 124d29e1
No related branches found
No related tags found
No related merge requests found
......@@ -88,13 +88,13 @@ line = widgets.HBox([button,import_ini_button,export_ini_button,replot_button])
display(line,output)
device = hp4155a.HP4155a('GPIB0::17::INSTR')
df_trasnfer = None
df_output = None
df_gatediode = None
df_transfer =pd.DataFrame()
df_output =pd.DataFrame()
df_gatediode = pd.DataFrame()
points_transfer = None
points_outptut = None
points_gatediode = None
points_transfer = 0
points_output = 0
points_gatediode = 0
def on_start_clicked(b):
with output:
......@@ -136,8 +136,8 @@ def on_start_clicked(b):
replot_transfer['y_variable'].value = 'IDmm/uA/um'
case _ :
information_box("Transfer Measurement skipped due to invalid parameters")
df_transfer = None
points_transfer = None
df_transfer = pd.DataFrame()
points_transfer = 0
if output_check.value == True:
match output_gates.value:
......@@ -161,8 +161,8 @@ def on_start_clicked(b):
replot_output['y_variable'].value = 'IDmm/uA/um'
case _ :
information_box("Output Measurement skipped due to invalid parameters")
df_output = None
points_output = None
df_output = pd.DataFrame()
points_output = 0
if gatediode_check.value == True:
......@@ -181,7 +181,7 @@ def on_start_clicked(b):
replot_gatediode['y_variable'].value = 'IBGmm/uA/um'
case _ :
information_box("Gatediode Measurement skipped due to invalid parameters")
df_gatediode = None
df_gatediode = pd.DataFrame()
information_box("Measurement finished!")
enable_widgets(all_widgets)
......
%% Cell type:code id:51b012d0-95b0-41c2-81bb-2205f3c53be2 tags:
``` python
%run double_gate_ADU.py
```
%% Output
%% Cell type:code id:cfa3a362-79e0-48d1-81ed-746264069e53 tags:
``` python
print(device.error())
```
%% Output
+0,"No error"
%% Cell type:code id:79f1c7eb-ac5f-423c-a2a2-42a0b4c7228d tags:
%% Cell type:code id:329c0c76-4194-4805-ab3f-fe9f55f79eea tags:
``` python
```
......
......@@ -164,7 +164,7 @@ def calculate_line(VTG,VBG):
# replot results
def replot_results(replot_dict,df,points,title):
if len(df.columns.tolist())!=0: # Measurement is done
if len(df.columns.tolist())!=0 and replot_dict['check'].value==True: # Measurement is done
fig,ax = plt.subplots()
#Retrieve the columns
......@@ -213,4 +213,3 @@ def replot_results(replot_dict,df,points,title):
\ No newline at end of file
\ No newline at end of file
......@@ -228,7 +228,8 @@ def additional_secondary(name,start,step,stop,comp):
'start': secondary_grid[1,0],
'step': secondary_grid[1,1],
'stop':secondary_grid[1,2],
'comp':secondary_grid[3,0]
'comp':secondary_grid[3,0],
'pcomp':secondary_grid[3,2]
}
return secondary_grid,parameters
......
......@@ -84,7 +84,7 @@ def Transfer_VTG(VTG,VDS,integration,sample,device):
df["ITGmm/uA/um"]= df["ITG/A"]*norm
# Plot normalized Results VTG-IDmm
fig,ax1= plt.subplots()
fig,ax1= plt.subplots(figsize=(15,9))
x = np.array_split(df["VTG/V"],points)
y = np.array_split(df["IDmm/uA/um"].abs(),points)
......@@ -217,7 +217,7 @@ def Transfer_VBG(VBG,VDS,integration,sample,device):
df["IBGmm/uA/um"]= df["IBG/A"]*norm
# Plot normalized Results VTG-IDmm
fig,ax1= plt.subplots()
fig,ax1= plt.subplots(figsize=(15,9))
x = np.array_split(df["VBG/V"],points)
y = np.array_split(df["IDmm/uA/um"].abs(),points)
......@@ -371,7 +371,7 @@ def Transfer_BOTH(VTG,VBG,VDS,integration,sample,device):
df["ITGmm/uA/um"]= df['ITG/A']*norm
# Plot normalized Results VTG-IDmm
fig,ax1= plt.subplots()
fig,ax1= plt.subplots(figsize=(15,9))
x1 = np.array_split(df["VBG/V"],points)
y = np.array_split(df["IDmm/uA/um"].abs(),points)
......@@ -463,7 +463,7 @@ def Output_VTG(VDS,VTG,integration,sample,device):
smu2 = device.smu_dict()
smu2.update(vname='VDS',iname='ID',mode = 'V',func = 'VAR1')
smu3= device.smu_dict()
smu3.update(vname='VBG',iname='ID',mode = 'COMM',func='CONS')
smu3.update(vname='VBG',iname='IBG',mode = 'COMM',func='CONS')
smu4 = device.smu_dict()
smu4.update(vname='VS',iname = 'IS',mode = 'COMM',func='CONS')
......@@ -524,7 +524,7 @@ def Output_VTG(VDS,VTG,integration,sample,device):
df["ITGmm/uA/um"]= df["ITG/A"]*norm
# Plot normalized Results VTG-IDmm
fig,ax1= plt.subplots()
fig,ax1= plt.subplots(figsize=(15,9))
x = np.array_split(df["VDS/V"],points)
y = np.array_split(df["IDmm/uA/um"],points)
......@@ -596,13 +596,13 @@ def Output_VTG(VDS,VTG,integration,sample,device):
return df,points
#Output VBG
def Output_VBG(VDS,VBG,intrgration,sample,device):
def Output_VBG(VDS,VBG,integration,sample,device):
smu1=device.smu_dict()
smu1.update(vname ='VTG',iname = 'ITG',mode = 'COMM',func='CONS')
smu2 = device.smu_dict()
smu2.update(vname='VDS',iname='ID',mode = 'V',func = 'VAR1')
smu3= device.smu_dict()
smu3.update(vname='VBG',iname='ID',mode = 'V',func = 'VAR2')
smu3.update(vname='VBG',iname='IBG',mode = 'V',func = 'VAR2')
smu4 = device.smu_dict()
smu4.update(vname='VS',iname = 'IS',mode = 'COMM',func='CONS')
......@@ -662,7 +662,7 @@ def Output_VBG(VDS,VBG,intrgration,sample,device):
df["IBGmm/uA/um"]= df["IBG/A"]*norm
# Plot normalized Results VTG-IDmm
fig,ax1= plt.subplots()
fig,ax1= plt.subplots(figsize=(15,9))
x = np.array_split(df["VDS/V"],points)
y = np.array_split(df["IDmm/uA/um"],points)
......@@ -672,7 +672,7 @@ def Output_VBG(VDS,VBG,intrgration,sample,device):
ax1.set_ylabel('$I_{D} (uA/um)$')
for i in range(points):
ax1.plot(x[i],y[i],label = f"VBG:{round(labels[i],3)} V")
ax1.plot(x[i],y[i],label = f"VBG:{round(labels_VBG[i],3)} V")
# Adding title
fig.suptitle('Output Curve', fontweight ="bold")
......@@ -740,7 +740,7 @@ def Output_BOTH(VDS,VTG,VBG,integration,sample,device):
smu2 = device.smu_dict()
smu2.update(vname='VDS',iname='ID',mode = 'V',func = 'VAR1')
smu3= device.smu_dict()
smu3.update(vname='VBG',iname='ID',mode = 'V',func = 'CONS')
smu3.update(vname='VBG',iname='IBG',mode = 'V',func = 'CONS')
smu4 = device.smu_dict()
smu4.update(vname='VS',iname = 'IS',mode = 'COMM',func='CONS')
......@@ -767,7 +767,7 @@ def Output_BOTH(VDS,VTG,VBG,integration,sample,device):
var2.update(
start=VTG['start'].value,
step=VTG['step'].value,
points=points,
points=points_VTG,
comp=VTG['comp'].value,
pcomp=VTG['pcomp'].value
)
......@@ -788,7 +788,7 @@ def Output_BOTH(VDS,VTG,VBG,integration,sample,device):
for i , value in enumerate(values_VBG):
cons = device.cons_smu_dict()
cons.update(comp = VBG['comp'].value,value = value)
device.setup_cons_smu(3,smu)
device.setup_cons_smu(3,cons)
if i == 0:
device.single_measurement()
......@@ -814,7 +814,7 @@ def Output_BOTH(VDS,VTG,VBG,integration,sample,device):
df["ITGmm/uA/um"]= df["ITG/A"]*norm
# Plot normalized Results VTG-IDmm
fig,ax1= plt.subplots()
fig,ax1= plt.subplots(figsize=(15,9))
x = np.array_split(df["VDS/V"],points)
y = np.array_split(df["IDmm/uA/um"],points)
......@@ -825,11 +825,11 @@ def Output_BOTH(VDS,VTG,VBG,integration,sample,device):
ax1.set_ylabel('$I_{D} (uA/um)$')
for i in range(points):
ax1.plot(x[i],y[i],label = f"VBG:{labels_VBG[i]} V , VTG:{labels_VTG[i]} V")
ax1.plot(x[i],y[i],label = f"VBG:{round(labels_VBG[i],3)} V , VTG:{round(labels_VTG[i],3)} V")
# Adding title
fig.suptitle('Output Curve', fontweight ="bold")
ax1.legend()
ax1.legend(mode='expand',ncols=points_VBG,loc='best')
fig.tight_layout()
display(fig)
......@@ -901,7 +901,7 @@ def Gatediode_VTG(VTG,integration,sample,device):
device.setup_smu(1,smu1)
device.smu_disable(2)
device.smu_disable(3)
device.setup(4,smu4)
device.setup_smu(4,smu4)
var1 = device.var1_dict()
var1.update(
......@@ -915,7 +915,6 @@ def Gatediode_VTG(VTG,integration,sample,device):
device.setup_var1(var1)
device.integration_time(integration)
device.display_mode("LIST")
variables_list = ['VTG','ITG']
device.variables_to_save(variables_list)
......@@ -940,7 +939,7 @@ def Gatediode_VTG(VTG,integration,sample,device):
df["ITGmm/uA/um"]= df["ITG/A"]*norm
# Plot normalized Results VTG-IDmm
fig,ax1= plt.subplots()
fig,ax1= plt.subplots(figsize=(15,9))
x = df["VTG/V"]
y = df["ITGmm/uA/um"].abs()
......@@ -953,7 +952,6 @@ def Gatediode_VTG(VTG,integration,sample,device):
# Adding title
fig.suptitle('Gatediode Curve', fontweight ="bold")
ax1.legend()
fig.tight_layout()
display(fig)
......@@ -1013,7 +1011,7 @@ def Gatediode_VBG(VBG,integration,sample,device):
device.smu_disable(1)
device.smu_disable(2)
device.setup_smu(3,smu3)
device.setup(4,smu4)
device.setup_smu(4,smu4)
var1 = device.var1_dict()
var1.update(
......@@ -1027,15 +1025,15 @@ def Gatediode_VBG(VBG,integration,sample,device):
device.setup_var1(var1)
device.integration_time(integration)
device.display_mode("LIST")
variables_list = ['VBG','IBG']
device.variables_to_save(variables_list)
device.single_measurement()
device.display_variable('X','VBG')
device.display_variable('Y1','IBG')
device.single_measurement()
while device.operation_completed()==False:
pass
......@@ -1053,7 +1051,7 @@ def Gatediode_VBG(VBG,integration,sample,device):
df["IBGmm/uA/um"]= df["IBG/A"]*norm
# Plot normalized Results VTG-IDmm
fig,ax1= plt.subplots()
fig,ax1= plt.subplots(figsize=(15,9))
x = df["VBG/V"]
y = df["IBGmm/uA/um"].abs()
......@@ -1066,7 +1064,6 @@ def Gatediode_VBG(VBG,integration,sample,device):
# Adding title
fig.suptitle('Gatediode Curve', fontweight ="bold")
ax1.legend()
fig.tight_layout()
display(fig)
......@@ -1102,13 +1099,13 @@ def Gatediode_VBG(VBG,integration,sample,device):
f.write("Sweeping Gate:VBG"+"\n\n")
f.write('Parameters\n')
f.write(f"VTG from {VTG['start'].value}V to {VTG['stop'].value}V with step {VTG['step'].value}V"+"\n")
f.write(f"VTG from {VBG['start'].value}V to {VBG['stop'].value}V with step {VBG['step'].value}V"+"\n")
#calculate the values
if VBG['pcomp'].value==0:
f.write(f"Back Gate Current Compliance/A:{VTG['comp'].value}"+"\n")
f.write(f"Back Gate Current Compliance/A:{VBG['comp'].value}"+"\n")
else:
f.write(f"Back Gate Power Compliance/A:{VTG['pcomp'].value}"+"\n")
f.write(f"Back Gate Power Compliance/A:{VBG['pcomp'].value}"+"\n")
f.write(f'Integration Time:{integration}'+"\n")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment