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

added normalization unit to the ADU software

parent c992e118
No related branches found
No related tags found
No related merge requests found
%% Cell type:code id:6defdb49-06c2-469d-beb5-bc2e147e3f79 tags: %% Cell type:code id:6defdb49-06c2-469d-beb5-bc2e147e3f79 tags:
``` python ``` python
%run ADU_version_2.py %run ADU_version_2.py
``` ```
%% Output %% Output
%% Cell type:code id:10fec266-9d1a-451c-9bf3-6b75412eabaa tags: %% Cell type:code id:0331b265-0fe6-4749-ac85-099509f735ea tags:
``` python ``` python
``` ```
......
...@@ -74,6 +74,7 @@ def on_start_clicked(b): ...@@ -74,6 +74,7 @@ def on_start_clicked(b):
disable_widgets(all_widgets) disable_widgets(all_widgets)
width = sample["width"].value width = sample["width"].value
norm=normalization_factor(width) norm=normalization_factor(width)
norm_unit = sample["normalization"].value
Setup(device) #setup the device Setup(device) #setup the device
#start measurements #start measurements
...@@ -127,15 +128,18 @@ def on_start_clicked(b): ...@@ -127,15 +128,18 @@ def on_start_clicked(b):
#execute measurement #execute measurement
Vgs,Vds,Idmm,gm,Igmm=Transfer(smu1,smu2,smu3,smu4,integration_transfer.value,norm,device) Vgs,Vds,Idmm,gm,Igmm=Transfer(smu1,smu2,smu3,smu4,integration_transfer.value,norm,device)
#Idmm = np.array(Id)*normalization_factor(width) Id = np.array(Idmm)/normalization_factor(width)
#Igmm = np.array(Ig)*normalization_factor(width) Ig = np.array(Igmm)/normalization_factor(width)
#gmmm = np.array(gm)*normalization_factor(width) gm_S = np.array(gm)/normalization_factor(width)
#plot results #plot results
clear_output() clear_output()
plot_transfer(Vgs,Idmm,gm,points) plot_transfer(Vgs,Idmm,gm,points,norm_unit)
#save results #save results
header=['VGS(V)','VDS(V)','IDmm(mA/mm)',"IGmm(mA/mm)",'gm(mS/mm)',"ABS(IDmm)(mA/mm)","ABS(IGmm)(mA/mm)"] if norm_unit =='mA/mm':
data = {header[0]:Vgs,header[1]:Vds,header[2]:Idmm,header[3]:Igmm,header[4]:gm,header[5]:np.abs(Idmm),header[6]:np.abs(Igmm)} header=['VGS(V)','VDS(V)','IDmm(mA/mm)',"IGmm(mA/mm)",'gm(mS/mm)',"ABS(IDmm)(mA/mm)","ABS(IGmm)(mA/mm)","ID(A)","IG(A)","gm(S)"]
else:
header=['VGS(V)','VDS(V)','IDmm(µA/µm)',"IGmm(µA/µm)",'gm(µS/µm)',"ABS(IDmm)(µA/µm)","ABS(IGmm)(µA/µm)","ID(A)","IG(A)","gm(S)"]
data = {header[0]:Vgs,header[1]:Vds,header[2]:Idmm,header[3]:Igmm,header[4]:gm,header[5]:np.abs(Idmm),header[6]:np.abs(Igmm),header[7]:Id,header[8]:Ig,header[9]:gm_S}
df = pd.DataFrame(data) df = pd.DataFrame(data)
#write to file #write to file
...@@ -189,15 +193,18 @@ def on_start_clicked(b): ...@@ -189,15 +193,18 @@ def on_start_clicked(b):
#execute measurement #execute measurement
Vgs,Vds,Idmm,Igmm = Output(smu1,smu2,smu3,smu4,integration_output.value,norm,device) Vgs,Vds,Idmm,Igmm = Output(smu1,smu2,smu3,smu4,integration_output.value,norm,device)
#Idmm = np.array(Id)*normalization_factor(width) Id = np.array(Idmm)/normalization_factor(width)
#Igmm = np.array(Ig)*normalization_factor(width) Ig = np.array(Igmm)/normalization_factor(width)
#plot results #plot results
clear_output() clear_output()
plot_output(Vds,Idmm,Igmm,points) plot_output(Vds,Idmm,Igmm,points,norm_unit)
#save results #save results
header=['VGS(V)','VDS(V)','IDmm(mA/mm)',"IGmm(mA/mm)","ABS(IDmm)(mA/mm)","ABS(IGmm)(mA/mm)"] if norm_unit == 'mA/mm':
data = {header[0]:Vgs,header[1]:Vds,header[2]:Idmm,header[3]:Igmm,header[4]:np.abs(Idmm),header[5]:np.abs(Igmm)} header=['VGS(V)','VDS(V)','IDmm(mA/mm)',"IGmm(mA/mm)","ABS(IDmm)(mA/mm)","ABS(IGmm)(mA/mm)","ID(A)","IG(A)"]
else:
header=['VGS(V)','VDS(V)','IDmm(µA/µm)',"IGmm(µA/µm)","ABS(IDmm)(µA/µm)","ABS(IGmm)(µA/µm)","ID(A)","IG(A)"]
data = {header[0]:Vgs,header[1]:Vds,header[2]:Idmm,header[3]:Igmm,header[4]:np.abs(Idmm),header[5]:np.abs(Igmm),header[6]:Id,header[7]:Ig}
df = pd.DataFrame(data) df = pd.DataFrame(data)
#write to file #write to file
...@@ -233,14 +240,16 @@ def on_start_clicked(b): ...@@ -233,14 +240,16 @@ def on_start_clicked(b):
smu3.update(VAR1=var1) smu3.update(VAR1=var1)
#execute measurement #execute measurement
Vgs,Igmm,ABSIgmm=Gatediode(smu1,smu3,smu4,integration_gatediode.value,norm,device) Vgs,Igmm,ABSIgmm=Gatediode(smu1,smu3,smu4,integration_gatediode.value,norm,device)
#Igmm = np.array(Ig)*normalization_factor(width) Ig = np.array(Igmm)/normalization_factor(width)
#ABSIgmm = np.array(ABSIg)*normalization_factor(width)
clear_output() clear_output()
plot_gatediode(Vgs,Igmm) plot_gatediode(Vgs,Igmm,norm_unit)
#save results #save results
header=['VGS(V)','IGmm(mA/mm)',"ABS(IGmm(mA/mm))"] if norm_unit == 'mA/mm':
data = {header[0]:Vgs,header[1]:Igmm,header[2]:ABSIgmm} header=['VGS(V)','IGmm(mA/mm)',"ABS(IGmm)(mA/mm)",'IG(A)']
else:
header=['VGS(V)','IGmm(µA/µm)',"ABS(IGmm)(µA/µm)",'IG(A)']
data = {header[0]:Vgs,header[1]:Igmm,header[2]:ABSIgmm,header[3]:Ig}
df = pd.DataFrame(data) df = pd.DataFrame(data)
filename =f"{sample['sample'].value}_{sample['field'].value}_{sample['device'].value}D.txt" filename =f"{sample['sample'].value}_{sample['field'].value}_{sample['device'].value}D.txt"
......
...@@ -7,7 +7,7 @@ import tkinter.messagebox ...@@ -7,7 +7,7 @@ import tkinter.messagebox
import pandas as pd import pandas as pd
def plot_transfer(x,y1,y2,curves): def plot_transfer(x,y1,y2,curves,norm_unit='mA/mm'):
x = np.array_split(x,curves) x = np.array_split(x,curves)
y1 = np.array_split(y1,curves) y1 = np.array_split(y1,curves)
...@@ -17,7 +17,10 @@ def plot_transfer(x,y1,y2,curves): ...@@ -17,7 +17,10 @@ def plot_transfer(x,y1,y2,curves):
color = 'tab:red' color = 'tab:red'
ax1.set_xlabel('$V_{GS} (V)$') ax1.set_xlabel('$V_{GS} (V)$')
if norm_unit == 'mA/mm':
ax1.set_ylabel('$I_{D} (mA/mm)$', color = color) ax1.set_ylabel('$I_{D} (mA/mm)$', color = color)
else:
ax1.set_ylabel('$I_{D} (µA/µm)$', color = color)
for i in range(curves): for i in range(curves):
ax1.plot(x[i], y1[i], color = color) ax1.plot(x[i], y1[i], color = color)
...@@ -28,7 +31,10 @@ def plot_transfer(x,y1,y2,curves): ...@@ -28,7 +31,10 @@ def plot_transfer(x,y1,y2,curves):
ax2 = ax1.twinx() ax2 = ax1.twinx()
color = 'tab:green' color = 'tab:green'
if norm_unit == "mA/mm":
ax2.set_ylabel('$g_{m} (mS/mm)$', color = color) ax2.set_ylabel('$g_{m} (mS/mm)$', color = color)
else:
ax2.set_ylabel('$g_{m} (µS/µm)$', color = color)
for i in range(curves): for i in range(curves):
ax1.plot(x[i], y2[i], color = color) ax1.plot(x[i], y2[i], color = color)
#ax2.plot(Vgs, gm, color = color) #ax2.plot(Vgs, gm, color = color)
...@@ -41,7 +47,7 @@ def plot_transfer(x,y1,y2,curves): ...@@ -41,7 +47,7 @@ def plot_transfer(x,y1,y2,curves):
display(fig) display(fig)
def plot_output(x,y1,y2,curves): def plot_output(x,y1,y2,curves,norm_unit = "mA/mm"):
x = np.array_split(x,curves) x = np.array_split(x,curves)
y1 = np.array_split(y1,curves) y1 = np.array_split(y1,curves)
...@@ -50,14 +56,20 @@ def plot_output(x,y1,y2,curves): ...@@ -50,14 +56,20 @@ def plot_output(x,y1,y2,curves):
fig,ax1 = plt.subplots() fig,ax1 = plt.subplots()
color='tab:red' color='tab:red'
ax1.set_xlabel('$V_{DS} (V)$') ax1.set_xlabel('$V_{DS} (V)$')
if norm_unit == 'mA/mm':
ax1.set_ylabel('$I_{D} (mA/mm)$', color = color) ax1.set_ylabel('$I_{D} (mA/mm)$', color = color)
else:
ax1.set_ylabel('$I_{D} (µA/µm)$', color = color)
for i in range(curves): for i in range(curves):
ax1.plot(x[i],y1[i],color=color) ax1.plot(x[i],y1[i],color=color)
ax1.tick_params(axis ='y', labelcolor = color,which = 'both') ax1.tick_params(axis ='y', labelcolor = color,which = 'both')
ax2 = ax1.twinx() ax2 = ax1.twinx()
color = 'tab:green' color = 'tab:green'
if norm_unit == 'mA/mm':
ax2.set_ylabel('$I_{G} (mA/mm)$', color = color) ax2.set_ylabel('$I_{G} (mA/mm)$', color = color)
else:
ax2.set_ylabel('$I_{G} (µA/µm)$', color = color)
for i in range(curves): for i in range(curves):
ax2.plot(x[i], y2[i], color = color) ax2.plot(x[i], y2[i], color = color)
ax2.tick_params(axis ='y', labelcolor = color,which = 'both') ax2.tick_params(axis ='y', labelcolor = color,which = 'both')
...@@ -65,12 +77,15 @@ def plot_output(x,y1,y2,curves): ...@@ -65,12 +77,15 @@ def plot_output(x,y1,y2,curves):
plt.title("Output Curve",fontweight ="bold") plt.title("Output Curve",fontweight ="bold")
display(fig) display(fig)
def plot_gatediode(x,y): def plot_gatediode(x,y,norm_unit = "mA/mm"):
fig, ax1 = plt.subplots() fig, ax1 = plt.subplots()
color = 'tab:red' color = 'tab:red'
ax1.set_xlabel('$V_{GS} (V)$') ax1.set_xlabel('$V_{GS} (V)$')
if norm_unit == "mA/mm":
ax1.set_ylabel('$I_{G} (mA/mm)$', color = color) ax1.set_ylabel('$I_{G} (mA/mm)$', color = color)
else:
ax1.set_ylabel('$I_{G} (µA/µm)$', color = color)
ax1.set_yscale('log') ax1.set_yscale('log')
y = np.absolute(y) y = np.absolute(y)
......
...@@ -100,8 +100,7 @@ def information_box_new(): ...@@ -100,8 +100,7 @@ def information_box_new():
for i in range(3): for i in range(3):
for j in range(2): for j in range(2):
if i ==2 and j == 1: if i ==2 and j == 1:
pass information_grid[i,j]=widgets.Dropdown(options=['mA/mm','µA/µm'],value='mA/mm',layout=Layout(height=height, width=width))#mind the gap
#information_grid[i,j]=widgets.Dropdown(options=['mA/mm','µA/µm'],value='mA/mm',layout=Layout(height=height, width=width))#mind the gap
elif i == 2 and j == 0: elif i == 2 and j == 0:
information_grid[i,j]=widgets.BoundedFloatText( information_grid[i,j]=widgets.BoundedFloatText(
value=100, value=100,
...@@ -117,14 +116,12 @@ def information_box_new(): ...@@ -117,14 +116,12 @@ def information_box_new():
information_grid[2,0].description = "Device Width(µm):" information_grid[2,0].description = "Device Width(µm):"
information_grid[0,1].description = "Field(XYY):" information_grid[0,1].description = "Field(XYY):"
information_grid[1,1].description = "Device:" information_grid[1,1].description = "Device:"
#information_grid[2,1].description = "Normalization:" information_grid[2,1].description = "Normalization:"
for i in range(3): for i in range(3):
for j in range(2): for j in range(2):
try:
information_grid[i,j].style = style information_grid[i,j].style = style
except:
pass
display(sample_information) display(sample_information)
display(information_grid) display(information_grid)
...@@ -135,8 +132,8 @@ def information_box_new(): ...@@ -135,8 +132,8 @@ def information_box_new():
'sample' : information_grid[1,0], 'sample' : information_grid[1,0],
'field': information_grid[0,1], 'field': information_grid[0,1],
'device':information_grid[1,1], 'device':information_grid[1,1],
'width': information_grid[2,0] 'width': information_grid[2,0],
#'normalization': information_grid[2,1] 'normalization': information_grid[2,1]
} }
return information return information
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment