├── 2021 Magic-angle lasers in nanostructured moiré superlattice.pdf ├── 2021 附件 Magic-angle lasers in nanostructured moiré superlattice.pdf ├── MagicAngleLaserForBand.fsp ├── MagicAngleLaserForBand.lsf └── README.md /2021 Magic-angle lasers in nanostructured moiré superlattice.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AAAAA521/MagicAngleLaserSimulation/fb8c7ede91d5170e3ae651a47ec735a07b167c96/2021 Magic-angle lasers in nanostructured moiré superlattice.pdf -------------------------------------------------------------------------------- /2021 附件 Magic-angle lasers in nanostructured moiré superlattice.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AAAAA521/MagicAngleLaserSimulation/fb8c7ede91d5170e3ae651a47ec735a07b167c96/2021 附件 Magic-angle lasers in nanostructured moiré superlattice.pdf -------------------------------------------------------------------------------- /MagicAngleLaserForBand.fsp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AAAAA521/MagicAngleLaserSimulation/fb8c7ede91d5170e3ae651a47ec735a07b167c96/MagicAngleLaserForBand.fsp -------------------------------------------------------------------------------- /MagicAngleLaserForBand.lsf: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | # This script combines the results from the Gamma-M-K-Gamma sweep 3 | # and plots the frequency spectrum fs from the bandstructure object 4 | # results over k, and the bandstructure. 5 | # The bandstructure information is extracted using tolerance and num_band 6 | # specified by the user at the beginning of the script. 7 | # 8 | # Properties: 9 | # a: period used to normalize the frequency (f_norm=f*a/c) 10 | # in this case the hexagonal lattice constant 11 | # f_band: Frequencies of bands in units of Hz 12 | # f_band_norm: Frequencies of bands in units of Hz * a / c 13 | ############################################################################# 14 | # User Defined properties: 15 | tolerance = 1.5e-5; #tolerance for finding peaks and accepting bands 16 | # setting this too low will result in noisy data where sidelobes of 17 | # peaks are interpreted as new bands 18 | # setting it too high will mean that some bands are not found 19 | num_band = 10; #number of bands to search for in the bandstructure 20 | # 21 | ############################################################################# 22 | num_point = 7; 23 | 24 | runsweep; # run all sweeps 25 | 26 | # get a from model 27 | a = getnamed("::model","a"); 28 | 29 | # get fs data from the sweeps 30 | sweepname="Gamma-M"; 31 | spectrum=getsweepresult(sweepname,"spectrum"); 32 | f=c/spectrum.lambda; 33 | fs_all=matrix(length(f),num_point*3); # initialize matrix to store fs data in 34 | fs_all(1:length(f),1:num_point)=spectrum.fs; 35 | 36 | sweepname="M-K"; 37 | spectrum=getsweepresult(sweepname,"spectrum"); 38 | fs_all(1:length(f),num_point+1:num_point*2)=spectrum.fs; 39 | 40 | sweepname="K-Gamma"; 41 | spectrum=getsweepresult(sweepname,"spectrum"); 42 | fs_all(1:length(f),num_point*2+1:num_point*3)=spectrum.fs; 43 | 44 | # simple imaging of fs vs k 45 | image(1:num_point*3,f,transpose(fs_all),"k (Gamma-M-K-Gamma)","f (Hz)","bandstructure, logscale","logplot"); 46 | #image(1:30,f,transpose(fs_all),"k (Gamma-M-K-Gamma)","f (Hz)","bandstructure, linearscale"); 47 | setplot("colorbar min",0); 48 | setplot("colorbar max",max(fs_all)*1e-4); 49 | 50 | 51 | f_norm = f*a/c; 52 | image(1:num_point*3,f_norm,transpose(fs_all),"k (Gamma-M-K-Gamma)","f(Hz)*(a/c)","bandstructure, logscale","logplot"); 53 | 54 | 55 | # plot bandstructure 56 | bandstructure=matrix(num_band,num_point*3); # initialize matrix in which to store band frequency information 57 | 58 | # loop over sweep results 59 | for (i=1:num_point*3){ 60 | #use findpeaks to find num_band number of peaks 61 | temp = findpeaks(fs_all(1:length(f),i),num_band); 62 | 63 | #collect data for any peaks that are more than 'tolerance' of the maximum peak (to avoid minor peaks like sidelobes) 64 | minvalue = fs_all(temp(1),i)*tolerance; 65 | f_band=matrix(num_band); 66 | for(bandcount = 1:num_band) { 67 | if( fs_all(temp(bandcount),i) > minvalue) { 68 | f_band(bandcount) = f(temp(bandcount)); 69 | } 70 | } 71 | 72 | f_band_norm = f_band*a/c; # normalize the frequency vector 73 | bandstructure(1:num_band,i)=f_band_norm; 74 | } 75 | 76 | bandstructure=transpose(bandstructure); 77 | plot(1:num_point*3,bandstructure,"k (Gamma-M-K-Gamma)","f (Hz*a/c)","bandstructure","plot points"); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MagicAngleLaserSimulation 2 | simulate Magic-Angle Laser with lumerical FDTD 3 | 4 | For more infomation 5 | https://mp.weixin.qq.com/s/PM_d2li8J1QnJngte9rceA 6 | --------------------------------------------------------------------------------