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

files correct plots and division bugs

parent 4f9658c2
No related branches found
No related tags found
No related merge requests found
%% Cell type:code id:6defdb49-06c2-469d-beb5-bc2e147e3f79 tags:
``` python
%matplotlib ipympl
%run ADU_version_2.py
```
%% Output
%% Cell type:code id:0331b265-0fe6-4749-ac85-099509f735ea tags:
``` python
```
......
......@@ -135,9 +135,9 @@ def on_start_clicked(b):
#execute measurement
Vgs,Vds,Idmm,gm,Igmm=Transfer(smu1,smu2,smu3,smu4,integration_transfer.value,norm,device)
Id = np.array(Idmm)/normalization_factor(width)
Ig = np.array(Igmm)/normalization_factor(width)
gm_S = np.array(gm)/normalization_factor(width)
Id = np.divide(Idmm,normalization_factor(width))
Ig = np.divide(Igmm,normalization_factor(width))
gm_S = np.divide(gm,normalization_factor(width))
#plot results
#clear_output()
plot_transfer(Vgs,Idmm,gm,points,norm_unit)
......@@ -201,8 +201,8 @@ def on_start_clicked(b):
#execute measurement
Vgs,Vds,Idmm,Igmm = Output(smu1,smu2,smu3,smu4,integration_output.value,norm,device)
Id = np.array(Idmm)/normalization_factor(width)
Ig = np.array(Igmm)/normalization_factor(width)
Id = np.divide(Idmm,normalization_factor(width))
Ig = np.divide(Igmm,normalization_factor(width))
#plot results
#clear_output()
plot_output(Vds,Idmm,Igmm,points,norm_unit)
......@@ -249,7 +249,7 @@ def on_start_clicked(b):
smu3.update(VAR1=var1)
#execute measurement
Vgs,Igmm,ABSIgmm=Gatediode(smu1,smu3,smu4,integration_gatediode.value,norm,device)
Ig = np.array(Igmm)/normalization_factor(width)
Ig = np.divide(Igmm,normalization_factor(width))
#clear_output()
plot_gatediode(Vgs,Igmm,norm_unit)
......
import matplotlib.pyplot as plt
import numpy as np
import time
from datetime import datetime
import tkinter as tk
from tkinter import filedialog
......@@ -8,7 +10,7 @@ import tkinter.messagebox
import pandas as pd
def plot_transfer(x,y1,y2,curves,norm_unit='mA/mm'):
with plt.ion():
x = np.array_split(x,curves)
y1 = np.array_split(y1,curves)
y2 = np.array_split(y2,curves)
......@@ -41,14 +43,14 @@ def plot_transfer(x,y1,y2,curves,norm_unit='mA/mm'):
ax2.tick_params(axis ='y', labelcolor = color,which = 'both')
# Adding title
plt.title('Transfer Curve', fontweight ="bold")
fig.suptitle('Transfer Curve', fontweight ="bold")
# Show plot
display(fig)
plt.show(block = False)
def plot_output(x,y1,y2,curves,norm_unit = "mA/mm"):
with plt.ion():
x = np.array_split(x,curves)
y1 = np.array_split(y1,curves)
y2 = np.array_split(y2,curves)
......@@ -74,10 +76,11 @@ def plot_output(x,y1,y2,curves,norm_unit = "mA/mm"):
ax2.plot(x[i], y2[i], color = color)
ax2.tick_params(axis ='y', labelcolor = color,which = 'both')
plt.title("Output Curve",fontweight ="bold")
display(fig)
fig.suptitle("Output Curve",fontweight ="bold")
plt.show(block = False)
def plot_gatediode(x,y,norm_unit = "mA/mm"):
with plt.ion():
fig, ax1 = plt.subplots()
color = 'tab:red'
......@@ -93,8 +96,8 @@ def plot_gatediode(x,y,norm_unit = "mA/mm"):
ax1.plot(x,y, color = color)
ax1.tick_params(axis ='y', labelcolor = color,which = 'both')
plt.title('Gatediode Curve', fontweight ="bold")
display(fig)
fig.suptitle('Gatediode Curve', fontweight ="bold")
plt.show(block=False)
def number_of_points(start,step,stop):
......@@ -210,8 +213,9 @@ def create_file(filename):
def save_to_file(measurement,file,sample,integration,Vgs,Vds=None):
with open(file,'w') as f:
f.write(f"{measurement}"+"\n")
f.write(f"Processing number:{sample['processing_number'].value}"+"\n")
date = str(datetime.today().replace(microsecond=0))
f.write(f"{measurement} at {date}"+"\n")
f.write(f"Series:{sample['processing_number'].value}"+"\n")
f.write(f"Sample:{sample['sample'].value}"+"\n")
f.write(f"Field:{sample['field'].value}"+"\n")
f.write(f"Device:{sample['device'].value}"+"\n")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment