-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplot_3B.py
More file actions
59 lines (53 loc) · 3.22 KB
/
Copy pathplot_3B.py
File metadata and controls
59 lines (53 loc) · 3.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from GeneralModel import GeneralModel
from GeneralModel import OperationMode
fit_raw_data = True
# Import and concatenate experimental data
lrs_200_O = pd.read_csv('Experimental Data/3B_LRS_O_200.csv', header=None)
lrs_200_O = lrs_200_O.sort_values(by=lrs_200_O.columns[0])
lrs_250_O = pd.read_csv('Experimental Data/3B_LRS_O_250.csv', header=None)
lrs_220_O = lrs_250_O.sort_values(by=lrs_250_O.columns[0])
lrs_300_O = pd.read_csv('Experimental Data/3B_LRS_O_300.csv', header=None)
lrs_300_O = lrs_300_O.sort_values(by=lrs_300_O.columns[0])
lrs_O = [lrs_200_O, lrs_250_O, lrs_300_O]
lrs_200_A = pd.read_csv('Experimental Data/3B_LRS_Al_200.csv', header=None)
lrs_200_A = lrs_200_A.sort_values(by=lrs_200_A.columns[0])
lrs_250_A = pd.read_csv('Experimental Data/3B_LRS_Al_250.csv', header=None)
lrs_220_A = lrs_250_A.sort_values(by=lrs_250_A.columns[0])
lrs_300_A = pd.read_csv('Experimental Data/3B_LRS_Al_300.csv', header=None)
lrs_300_A = lrs_300_A.sort_values(by=lrs_300_A.columns[0])
lrs_A = [lrs_200_A, lrs_250_A, lrs_300_A]
temperatures = [273+200, 273+250, 273+300]
# Fit the model in gradual operation mode
if fit_raw_data:
lrs_O_model = GeneralModel(operation_mode=OperationMode.gradual, cell_size_dependance=False)
lrs_O_model_parameters = {'initial_resistance': 4250, 'p_0': 1.541e-13, 'p_1': 0, 'p_2': 63.43, 'p_3': 0.04, 'temperature_threshold': 298}
lrs_A_model = GeneralModel(operation_mode=OperationMode.gradual, cell_size_dependance=False)
lrs_A_model_parameters = {'initial_resistance': 4250, 'p_0': 4.764e-17, 'p_1': 0, 'p_2': 76.47, 'p_3': 0.014, 'temperature_threshold': 298}
# Plot the experimental data and results from the model
matplotlib.rcParams['axes.linewidth'] = 2
matplotlib.rcParams['font.family'] = 'sans-serif'
label_size = 20
tick_size = 16
plt.figure(1)
plt.gca().set_axisbelow(True)
plt.minorticks_on()
plt.title('Ti/HfO$_x$/TiN\nTi/HfAlO/TiN', fontsize=label_size)
markers = ['s', '^', 'v']
for i in range(len(temperatures)):
plt.grid(b=True, which='both')
plt.xscale('log')
plt.yscale('log')
plt.plot(lrs_O[i].iloc[:, 0].values, lrs_O[i].iloc[:, 1].values, linestyle='-', color='b', marker=markers[i], markersize=17.5, markerfacecolor='None', markeredgewidth=2.5)
plt.plot(lrs_A[i].iloc[:, 0].values, lrs_A[i].iloc[:, 1].values, linestyle='-', color='magenta', marker=markers[i], markersize=17.5, markerfacecolor='None', markeredgewidth=2.5)
if fit_raw_data:
plt.plot(lrs_O[i].iloc[:, 0].values, lrs_O_model.model(lrs_O[i].iloc[:, 0].values, **lrs_O_model_parameters, temperature=temperatures[i]), linestyle='--', color='b', marker='o', markersize=15, markerfacecolor='None', markeredgewidth=1)
plt.plot(lrs_A[i].iloc[:, 0].values, lrs_A_model.model(lrs_A[i].iloc[:, 0].values, **lrs_A_model_parameters, temperature=temperatures[i]), linestyle='--', color='magenta', marker='o', markersize=15, markerfacecolor='None', markeredgewidth=1)
plt.xlabel('Time (s)', fontsize=label_size)
plt.ylabel('Resistance ($\Omega$)', fontsize=label_size)
plt.gca().tick_params(axis='both', which='major', labelsize=tick_size)
plt.gca().tick_params(axis='both', which='minor', labelsize=tick_size)
plt.show()