-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_mult.py
More file actions
44 lines (31 loc) · 1 KB
/
plot_mult.py
File metadata and controls
44 lines (31 loc) · 1 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
import matplotlib
matplotlib.use('PDF')
import matplotlib.pyplot as plt
from mfss_helper import *
import sys
Ninp = len(sys.argv)
plt.figure()
for N in range(1,Ninp):
inputfile = sys.argv[N]
jobname,exptfile,jobtyp,disr,Vol,shift,rate_dict,plot_title,plot_label = parse_input(inputfile)
Vol = Vol**3
rates = get_rates(rate_dict,jobtyp)
if N == 1:
expt_x, expt_y, x_min, x_max, ef = read_file(exptfile)
mfss_x, mfss_y, mfss_eea, mfss_eca = mfss(rates,jobtyp,disr,Vol,shift)
if jobtyp == 'eqe':
mfss_y = 100*np.array(mfss_y)
expt_y = 100*np.array(expt_y)
if N == 1:
plt.semilogx(expt_x,expt_y,'.',label="Experiment")
plt.semilogx(mfss_x,mfss_y,label=plot_label)
plt.title(plot_title)
if jobtyp == 'eqe':
plt.xlabel("Current density (mA/cm^2)")
plt.ylabel("External Quantum Efficiency (%)")
if jobtyp == 'plqy':
plt.xlabel("Excitation density (cm^-3)")
plt.ylabel("rel. PLQY")
plt.legend()
#plt.show()
plt.savefig(jobname+".pdf")