Notes: 1) materials are described in SI units 2) materials are stored in datalib 3) materials are output as m = n+j*k 4) materials are iterpolated in datalib based on input lda values """ if calc_spectrum: lda = np_slab.lambda_array*1e9 dlist = np.array(np_slab.d)*1e9 dlist[0] = dlist[-1] = inf theta = 0 T_list = []; R_list = []; A_list = []; for lda_idx in range(len(lda)): inc_tmm_data = tmm.inc_tmm('s',np_slab.n[:,lda_idx],dlist,c_list,theta,lda[lda_idx]) A_list.append(tmm.inc_absorp_in_each_layer(inc_tmm_data)) #stores as list of np.arrays T_list.append(inc_tmm_data['T']) R_list.append(inc_tmm_data['R']) A = stack(A_list, axis = 0) # convert list of np.arrays to single np.array T = array(T_list, dtype = complex) # Convert list to array for math operations R = array(R_list, dtype = complex) # Convert list to array for math operations ############################################################################## ############################################################################## #%% if plot_spectrum: """ Plot TMM and measured absorption
c_list = ['i', 'c', 'c', 'c', 'c', 'c', 'i'] theta = 0 T_list = [] R_list = [] A_list = [] for lda0 in lda: n_list = [ 1, msi3n4np_ideal_fn(lda0), msio2np_ideal_fn(lda0), msio2_fn(lda0), msi3n4_fn(lda0), mag_fn(lda0), 1 ] inc_tmm_data = tmm.inc_tmm('s', n_list, d_list, c_list, theta, lda0) A_list.append(tmm.inc_absorp_in_each_layer( inc_tmm_data)) #stores as list of np.arrays T_list.append(inc_tmm_data['T']) R_list.append(inc_tmm_data['R']) A = stack(A_list, axis=0) # convert list of np.arrays to single np.array T = array(T_list, dtype=complex) # Convert list to array for math operations R = array(R_list, dtype=complex) # Convert list to array for math operations ############################################################################## ############################################################################## #%% """ Plot TMM result with measured result """
T_list = [] R_list = [] A_list = [] d_list = [inf, 359.944, 35089.86, 15.62, 525000, inf] # list of layer thicknesses in nm c_list = ['i', 'i', 'i', 'c', 'i', 'i'] theta = 0 for lda0 in lda: n_list = [ 1, msio2rough_fn(lda0), msio2np_fn(lda0), msio2_fn(lda0), msi_fn(lda0), 1 ] inc_tmm_data = tmm.inc_tmm('s', n_list, d_list, c_list, theta, lda0) A_list.append(tmm.inc_absorp_in_each_layer( inc_tmm_data)) #stores as list of np.arrays T_list.append(inc_tmm_data['T']) R_list.append(inc_tmm_data['R']) A = stack(A_list, axis=0) # convert list of np.arrays to single np.array T = array(T_list, dtype=complex) # Convert list to array for math operations R = array(R_list, dtype=complex) # Convert list to array for math operations ############################################################################## ############################################################################## #%% """ Run the TMM code per wavelength for SiO2 NP on Si using IDEAL MATERIALS """