-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCircularRR_AOPS_Fig_06bc.py
41 lines (35 loc) · 2.15 KB
/
CircularRR_AOPS_Fig_06bc.py
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
"""
The code for the research presented in the paper titled "A deep learning method for empirical spectral prediction and inverse design of all-optical nonlinear plasmonic ring resonator switches
@authors: Ehsan Adibnia, Majid Ghadrdan and Mohammad Ali Mansouri-Birjandi
Corresponding author: [email protected]
This code is corresponding to the Inverse Deep Neural Network (DNN) section of the article.
This code regenerates the Fig 6b and 6c of the paper.
Please cite the paper in any publication using this code.
"""
import matplotlib.pyplot as plt
import pandas as pd
from matplotlib.font_manager import FontProperties
lum = pd.read_csv("CircularRR_AOPS_Fig_06bc_furthest_predicted.csv", header=None)
g = "\u00D7"
lum=lum.to_numpy()
# plot of transmission of furthest data and predicted data from inverse model using FDTD solver
plt.plot(lum[1:800,0],lum[1:800,6], linewidth=2, color='#ff7f0e')
plt.plot(lum[1:800,0],lum[1:800,13], linewidth=2, linestyle='--', color='#1f77b4')
plt.title('Results of inverse design for through port', fontname='Times New Roman', fontsize=18, loc='center')
plt.xlabel('Wavelength (nm)', fontname='Times New Roman', fontsize=18)
plt.ylabel('Transmission', fontname='Times New Roman', fontsize=18)
plt.xticks(fontfamily='Times New Roman', fontsize=14)
plt.yticks(fontfamily='Times New Roman', fontsize=14)
font_prop = FontProperties(family="Times New Roman", size=14)
plt.legend(['Desierd (49,37,43,18,22)', 'DL (57,38,43,15,21)'], prop=font_prop)
plt.show()
plt.plot(lum[1:800,0],lum[1:800,7], linewidth=2, color='#ff7f0e')
plt.plot(lum[1:800,0],lum[1:800,14], linewidth=2, linestyle='--', color='#1f77b4')
plt.title('Results of inverse design for drop port', fontname='Times New Roman', fontsize=18, loc='center')
plt.xlabel('Wavelength (nm)', fontname='Times New Roman', fontsize=18)
plt.ylabel('Transmission', fontname='Times New Roman', fontsize=18)
plt.xticks(fontfamily='Times New Roman', fontsize=14)
plt.yticks(fontfamily='Times New Roman', fontsize=14)
font_prop = FontProperties(family="Times New Roman", size=14)
plt.legend(['Desierd (49,37,43,18,22)', 'DL (57,38,43,15,21)'], prop=font_prop)
plt.show()