from scipy import stats from matplotlib.pyplot import errorbar #Include your library path in sys #sys.path.append(os.path.dirname(os.path.dirname(__file__))) #sys.path.append(os.getcwd()) #Include your Library from graph_library.pltgraph import Plot from graph_library.pltgraph import scale from graph_library.csvreader import csv_data save_path = 'C:\\Users\\giraa\\source\\repos\\measurement_graph\\addFigure' data_path = 'C:\\Users\\giraa\\source\\repos\\measurement_graph\\data\\1.1.1k.t.csv' data = csv_data(data_path) Plot(data['V2'], data['V1'], 'V', 'V', '$V_{in}$', '$V_{out}$', '1.1.hys', save_path, False, 'pdf') data_path = 'C:\\Users\\giraa\\source\\repos\\measurement_graph\\data\\1.2.1k.t.csv' data = csv_data(data_path) Plot(data['V2'], data['V1'], 'V', 'V', '$V_{in}$', '$V_{out}$', '1.2.hys', save_path, False, 'pdf') # data_path = 'C:\\Users\\giraa\\source\\repos\\measurement_graph\\data\\1.1.1k.t.csv' # data = csv_data(data_path) # Plot([data['time'], data['time']], [data['V1'], data['V2']], 's', 'V', '$time$', '$voltage$', '1.1.1k.t', save_path, False, 'pdf', labels = ('$V_{out}$', '$V_{in}$')) # data_path = 'C:\\Users\\giraa\\source\\repos\\measurement_graph\\data\\1.1.10.s.csv' # data = csv_data(data_path) # Plot([data['time'], data['time']], [data['V1'], data['V2']], 's', 'V', '$time$', '$voltage$', '1.1.10.s', save_path, False, 'pdf', labels = ('$V_{out}$', '$V_{in}$')) # data_path = 'C:\\Users\\giraa\\source\\repos\\measurement_graph\\data\\1.2.1k.c.csv'
import os import sys import numpy as np import pandas as pd #Include your library path in sys sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))) #Include your Library from graph_library.pltgraph import Plot from graph_library.csvreader import csv_data #save_path = save figure #data_path = csv file path save_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'figure') data_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'data\\exp1\\2N3904\\2000.11.12.exp_3-1-2_1kOhm_I_E_V_BE.csv') #data = dictionary format data from WaveForms exported raw data data = csv_data(data_path) X = data['V2'] Y = data['V1']/1000 Plot(X, Y , X_unit = 'V', Y_unit = 'A', X_name = '$V_{BE}$', Y_name = '$I_{E}$', graph_name = '2N3904_IE_VBE', save_path = save_path, linear_fit = False, File_format = 'jpg')
sys.path.append( os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(__file__))))) #Include your Library from graph_library.pltgraph import Plot from graph_library.csvreader import csv_data #save_path = save figure #data_path = csv file path save_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'figure') data_path = os.path.join( os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'data\\exp3\\5_Module2sine_1kHz_OP97F_1V_10kOhm.csv') #data = dictionary format data from WaveForms exported raw data data = csv_data(data_path) X = [data['time'], data['time']] Y = [data['V1'], data['V2']] Plot(X, Y, X_unit='s', Y_unit='V', X_name='$t$', Y_name='$V_{in}, V_{out}$', graph_name='exp3_5_output_saturation', save_path=save_path, linear_fit=False, File_format='jpg', labels=('$V_{in}$', '$V_{out}$'))
#Include your library path in sys sys.path.append( os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(__file__))))) #Include your Library from graph_library.pltgraph import Plot from graph_library.csvreader import csv_data #save_path = save figure #data_path = csv file path save_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'figure') data_path = os.path.join( os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'data\\exp1\\2N3906\\exp_I_B_I_C_sameasprev.csv') #data = dictionary format data from WaveForms exported raw data data = csv_data(data_path) X = data['V1'] / 1e5 Y = data['V2'] / 100 Plot(X, Y, X_unit='A', Y_unit='A', X_name='$I_{B}$', Y_name='$I_{C}$', graph_name='2N3906_IB_IC', save_path=save_path, linear_fit=True, File_format='jpg')
sys.path.append( os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(__file__))))) #Include your Library from graph_library.pltgraph import Plot from graph_library.csvreader import csv_data #save_path = save figure #data_path = csv file path save_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'figure') data_path = os.path.join( os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'data\\exp2\\exp2.1\\Vin_VBE_R_adjustable_changed_2.csv') #data = dictionary format data from WaveForms exported raw data data = csv_data(data_path, [0, 3000]) X = [data['time'], data['time']] Y = [data['V1'], data['V2']] Plot(X, Y, X_unit='s', Y_unit='V', X_name='t', Y_name='$V_{in}, V_{BE}$', graph_name='CEA_V_in_V_BE_2', save_path=save_path, linear_fit=False, File_format='jpg', labels=('$V_{in}$', '$V_{BE}$'))
from graph_library.csvreader import csv_data #save_path = save figure #data_path = csv file path save_path = os.path.join(os.path.dirname(__file__), 'figure') data_path = os.path.join( os.path.dirname(os.path.dirname(__file__)), 'data\\exp_0.6_1.6_.._4.6_tri_0_5V_100kOhm_100Ohm_IB_VCE.csv') #data = dictionary format data from WaveForms exported raw data data = csv_data(data_path) # variables in Plot # Plot(X = data['V1'], Y = data['V2'], X_unit = 'V', Y_unit = 'V', X_name = '$V_1$', Y_name = '$V_2$', graph_name = 'example', save_path = save_path, linear_fit = True, File_format = 'pdf', label = 'None') # default: linear_fit = False, File_format = 'pdf' # single plot and linear regression Plot(data['V1'], data['V2'], 'V', 'V', '$V_1$', '$V_2$', 'example1', save_path, True, 'jpg') # multi plot Plot([data['time'], data['time']], [data['V1'], data['V2']], 's', 'V', '$t$', '$V_{1}, V_{2}$', 'example2', save_path, False, 'png', labels=('$V_{1}$', '$V_{2}$'))
sys.path.append( os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(__file__))))) #Include your Library from graph_library.pltgraph import Plot from graph_library.csvreader import csv_data #save_path = save figure #data_path = csv file path save_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'figure') data_path = os.path.join( os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'data\\exp3\\3_Module2sine_1kHz_10kOhm_OP97F.csv') #data = dictionary format data from WaveForms exported raw data data = csv_data(data_path) X = [data['time'], data['time']] Y = [data['V1'], data['V2']] Plot(X, Y, X_unit='s', Y_unit='V', X_name='$t$', Y_name='$V_{in}, V_{out}$', graph_name='exp3_3_buffer_10kOhm', save_path=save_path, linear_fit=False, File_format='jpg', labels=('$V_{in}$', '$V_{out}$'))
sys.path.append( os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(__file__))))) #Include your Library from graph_library.pltgraph import Plot from graph_library.csvreader import csv_data #save_path = save figure #data_path = csv file path save_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'figure') data_path = os.path.join( os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'data\\exp2\\exp2.2\\Self-biased_negative_feedback_V_CE.csv') #data = dictionary format data from WaveForms exported raw data data = csv_data(data_path, [0, 3000]) X = [data['time'], data['time']] Y = [data['V1'], data['V2']] Plot(X, Y, X_unit='s', Y_unit='V', X_name='$t$', Y_name='$V_{in}, V_{CE}$', graph_name='SBNF_V_CE', save_path=save_path, linear_fit=False, File_format='jpg', labels=('$V_{in}$', '$V_{CE}$'))
R_list = [1, 2.5, 2, 3, 5] R_list = [2.5] for R in R_list: save_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'figure') data_path = os.path.join( os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'data\\exp3\\7_Module2sine_1kHz_OP97F_sine_1V_1kOhm_' + str(R) + 'kOhm.csv') #data = dictionary format data from WaveForms exported raw data data = csv_data(data_path) X = [data['time'], data['time']] Y = [data['V1'], data['V2']] print(min(data['V2']), max(data['V2']), np.average(data['V2'])) print(min(data['V1']), max(data['V1']), np.average(data['V1'])) Plot(X, Y, X_unit='s', Y_unit='V', X_name='$t$', Y_name='$V_{in}, V_{out}$', graph_name='exp3_7_non_inverting_' + str(R) + 'kOhm', save_path=save_path, linear_fit=False, File_format='jpg', labels=('$V_{in}$', '$V_{out}$'))
#Include your library path in sys sys.path.append( os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(__file__))))) #Include your Library from graph_library.pltgraph import Plot from graph_library.csvreader import csv_data #save_path = save figure #data_path = csv file path save_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'figure') data_path = os.path.join( os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'data\\exp1\\2N3906\\exp_V_CE_IC_sameasprev.csv') #data = dictionary format data from WaveForms exported raw data data = csv_data(data_path) X = data['V1'] Y = data['V2'] / 100 Plot(X, Y, X_unit='V', Y_unit='A', X_name='$V_{CE}$', Y_name='$I_{C}$', graph_name='2N3906_IC_VCE', save_path=save_path, linear_fit=False, File_format='jpg')
import os import sys import numpy as np import pandas as pd #Include your library path in sys sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))) #Include your Library from graph_library.pltgraph import Plot from graph_library.csvreader import csv_data #save_path = save figure #data_path = csv file path DC_list = [1, 2, 3, 4, 5, 6, 7, 8, 9] #DC_list = [8] for DC in DC_list: save_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'figure') data_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'data\\exp3\\6_Module2sine_1kHz_OP97F_sine_0.5V_DC'+str(DC)+'00mV.csv') #data = dictionary format data from WaveForms exported raw data data = csv_data(data_path) X = [data['time'], data['time']] Y = [data['V1'], data['V2']] #print(min(data['V2']), max(data['V2']), np.average(data['V2'])) #print(min(data['V1']), max(data['V1']), np.average(data['V1'])) Plot(X, Y , X_unit = 's', Y_unit = 'V', X_name = '$t$', Y_name = '$V_{in}, V_{out}$', graph_name = 'exp3_6_summing_circuit_DC'+str(DC)+'00mV', save_path = save_path, linear_fit = False, File_format = 'jpg', labels = ('$V_{in}$','$V_{out}$'))
#Include your library path in sys sys.path.append( os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(__file__))))) #Include your Library from graph_library.pltgraph import Plot from graph_library.csvreader import csv_data #save_path = save figure #data_path = csv file path save_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'figure') data_path = os.path.join( os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'data\\exp1\\ZVN2110A\\NMOS_ID_vs_VGS_XY_plot_100Ohm.csv') #data = dictionary format data from WaveForms exported raw data data = csv_data(data_path) X = data['V1'] Y = data['V2'] / 100 Plot(X, Y, X_unit='V', Y_unit='A', X_name='$V_{GS}$', Y_name='$I_{D}$', graph_name='ZVN2110A_I_D_V_GS', save_path=save_path, linear_fit=False, File_format='jpg')
#save_path = save figure #data_path = csv file path save_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'figure') data_path_1 = os.path.join( os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'data\\exp1\\2N3906\\2000.11.12.exp_3-1-2_1kOhm_I_E_V_BE_pnp.csv') #data = dictionary format data from WaveForms exported raw data data = csv_data(data_path_1) X_6 = -data['V2'] Y_6 = -data['V1'] / 1000 data_path_2 = os.path.join( os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'data\\exp1\\2N3904\\2000.11.12.exp_3-1-2_1kOhm_I_E_V_BE.csv') #data = dictionary format data from WaveForms exported raw data data = csv_data(data_path_2) X_4 = data['V2'] Y_4 = data['V1'] / 1000 Plot([X_4, X_6], [Y_4, Y_6], X_unit='V', Y_unit='A', X_name='$V_{BE}$', Y_name='$I_{E}$', graph_name='both_I_E_V_BE', save_path=save_path, linear_fit=False, File_format='jpg', labels=['2N3904', '2N3906'])
os.path.dirname(__file__))))) #Include your Library from graph_library.pltgraph import Plot from graph_library.csvreader import csv_data #save_path = save figure #data_path = csv file path save_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'figure') data_path = os.path.join( os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'data\\exp1\\ZVN2110A\\NMOS_VDS_vs_ID_stair_offset_1.7.csv') #data = dictionary format data from WaveForms exported raw data data = csv_data(data_path, [0, 4000]) V_tot = data['V1'] + data['V2'] X = np.array([data['time'], data['time']]) Y = np.array([data['V1'], data['V2']]) Plot(X, Y, X_unit='s', Y_unit='V', X_name='$t$', Y_name='$V_{DS}, I_{D}R_{1}$', graph_name='ZVN2110A_I_D_V_DS_Offset_1.7', save_path=save_path, linear_fit=False, File_format='jpg', labels=['$V_{DS}$', '$I_{D}R_{1}$']) plt.show()
import sys import numpy as np import pandas as pd #Include your library path in sys #sys.path.append(os.path.dirname(os.path.dirname(__file__))) #sys.path.append(os.getcwd()) #Include your Library from graph_library.pltgraph import Plot from graph_library.csvreader import csv_data save_path = 'C:\\Users\\giraa\\source\\repos\\measurement_graph\\figure' data_path = 'C:\\Users\\giraa\\source\\repos\\measurement_graph\\data\\3.0.1.csv' data = csv_data(data_path) Plot(data['time'], data['V1'], 's', 'V', '$time$', '$voltage$', '3.0.1', save_path, False, 'pdf', labels = ('$V_{out}$')) data_path = 'C:\\Users\\giraa\\source\\repos\\measurement_graph\\data\\3.0.2.csv' data = csv_data(data_path) Plot(data['time'], data['V1'], 's', 'V', '$time$', '$voltage$', '3.0.2', save_path, False, 'pdf', labels = '$V_{out}$') data_path = 'C:\\Users\\giraa\\source\\repos\\measurement_graph\\data\\3.0.3.csv' data = csv_data(data_path) Plot(data['time'], data['V1'], 's', 'V', '$time$', '$voltage$', '3.0.3', save_path, False, 'pdf', labels = '$V_{out}$') data_path = 'C:\\Users\\giraa\\source\\repos\\measurement_graph\\data\\3.0.4.csv' data = csv_data(data_path) Plot(data['time'], data['V1'], 's', 'V', '$time$', '$voltage$', '3.0.4', save_path, False, 'pdf', labels = '$V_{out}$') data_path = 'C:\\Users\\giraa\\source\\repos\\measurement_graph\\data\\3.0.5.csv' data = csv_data(data_path)