#ds_init = ds[0,1:-1].squeeze() #ds_final = ds[-1,1:-1].squeeze() ds_init = ds[j, 1:-1].squeeze() # We define the material refractive index values. # The solver supports complex materials. # If dispersive materials are required, please see TMatrixOpt.geometry # for how to define them. nair = 1.0 # air nsi = 3.5 # silicon nsio2 = 1.4 # silicon dioxide # See layer stack at top of this script. We define each layer # using the TMatrixOpt.geometry module layers = [] air_front = geometry.Layer('air_front', 0.0, nair, False) for i in range(10): if i % 2 == 0: layer = geometry.Layer('layer', ds_init[i], nsi, False) else: layer = geometry.Layer('layer', ds_init[i], nsio2, False) layers.append(layer) air_back = geometry.Layer('air_back', 0.0, nair, False) layers = [air_front] + layers + [air_back] # We define the desired photon energies and incident angles for calculation #photon_energies = np.linspace(0.1, 0.8, num=14001) #thetas = np.linspace(0,90, num=901)
vmin=0.0, vmax=1.0, extent=extent, aspect='auto') ax2.set_title('TM Reflectivity') ax2.set_xlabel('Incident Angle (Degrees)') ax2.set_ylabel('Photon Energy (eV)') f.colorbar(im2, ax=ax2) plt.show() if __name__ == '__main__': import time air_front = geometry.Layer('air_front', 0.0, 1.0, False) superstrate = geometry.Layer('superstrate', 0.4668e-6, 3.5, False) #layer2 = geometry.LinearChirp('linearchirp', 0.1, 0.74, 6, 1.6, 3.5, 1.6, 3.5, False) layer2 = geometry.DiscreteChirp('linearchirp', 0.45, 20, 1.6, 3.5, 1.6, 3.5, False) metal_back = geometry.Layer('metal_back', 0.2e-6, 0.5 + 11 * 1j, False) air_back = geometry.Layer('air_back', 0.0, 1.0, False) #layers = [air_front, superstrate, layer2, metal_back, air_back] #layers = [air_front, superstrate, layer2, air_back] layers = [air_front, layer2, air_back] photon_energies = np.linspace(0.1, 0.74, num=6400) thetas = np.linspace(0, 90, num=181) stack = LayerStack(photon_energies, thetas, layers) stack.build()
ax6.set_ylabel('Photon Energy (eV)') fff.colorbar(im6, ax=ax6) plt.show() if __name__ == '__main__': import time nair = 1.0 #nsio2 = 1.4 + 0.01j #nsi = 3.5 + 0.01j nsio2 = 1.4 nsi = 3.5 nau = 0.5 + 11 * 1j air_front = geometry.Layer('air_front', 0.0, nair, False) #discretechirp = geometry.DiscreteChirp('discretechirp', 0.45, 10, nsi, nsio2, 3.5, 1.4, False) discretechirp = geometry.LinearChirp('discretechirp', 0.2, 0.6, 5, nsi, nsio2, 3.5, 1.4, False) metal_back = geometry.Layer('metal_back', 0.5e-6, 0.5 + 11 * 1j, False) air_back = geometry.Layer('air_back', 0.0, nair, False) #layers = [air_front, superstrate, layer2, metal_back, air_back] #layers = [air_front, superstrate, layer2, air_back] #layers = [air_front, discretechirp, air_back] layers = [air_front, discretechirp, metal_back, air_back] #layers = [air_front, layer2, air_back] photon_energies = np.linspace(0.1, 0.74, num=1281) thetas = np.linspace(0, 90, num=181) stack = LayerStack(photon_energies, thetas, layers) stack.build()
""" # For saving data later: import scipy.io # We define the material refractive index values. # The solver supports complex materials. # If dispersive materials are required, please see TMatrixOpt.geometry # for how to define them. nair = 1.0 # air nsi = 3.5 # silicon nsio2 = 1.4 # silicon dioxide nau = 0.5+11*1j # gold # See layer stack at top of this script. We define each layer # using the TMatrixOpt.geometry module air_front = geometry.Layer('air_front', 0.0, nair, False) designable_layers = geometry.DiscreteChirp('discretechirp', 0.45, 5, nsi, nsio2, nsi, nsio2, True) #metal_back = geometry.Layer('metal_back', 0.5e-6, nau, False) air_back = geometry.Layer('air_back', 0.0, nair, False) #layers = [air_front, designable_layers, metal_back, air_back] layers = [air_front, designable_layers, air_back] # We define the desired photon energies and incident angles for calculation photon_energies = np.linspace(0.1, 0.74, num=641) thetas = np.linspace(0,90, num=46) # We create the LayerStack stack = LayerStack(photon_energies, thetas, layers, TM_weight=0.5) # Important, we must run stack.build() from the solve module: stack.build()