######################################################### # file: waveguide_bragg_analysis.lsf # # Description: # This file will perform some simple analysis # on the waveguide_bragg simulation data. Most # of these graphs can be easily reproduced # by using the Analysis Window. # # Copyright 2007, Lumerical Solutions, Inc. ######################################################### clear; closeall; t=getdata("out","t"); Ey=getdata("out","Ey"); plot(t*1e12,Ey,"Time (fs)","Ey","Waveguide output"); f=fftw(t)/2/pi; Eyf=fft(Ey); Eyf=abs(Eyf^2); plot(f/1e12,Eyf,"Freq (Thz)", "Ey Intensity","Waveguide output"); f=getdata("transmission","f"); Px=getdata("transmission","Px"); y=getdata("transmission","y"); y_cnt=round(length(y)/2); z=getdata("transmission","z"); z_cnt=round(length(z)/2); Px=pinch(Px(1,y_cnt,z_cnt,1:length(f))); plot(f/1e12,real(Px),"Freq (THz)","Real(Px)","Q factor"); x=getdata("horpro","x"); y=getdata("horpro","y"); f=getdata("horpro","f"); Ey=getdata("horpro","Ey"); Ey=abs(Ey^2); image(x*1e6,y*1e6,Ey(1:length(x),1:length(y),1,1),"x (um)","y (um)","on resonance"); image(x*1e6,y*1e6,Ey(1:length(x),1:length(y),1,2),"x (um)","y (um)","off resonance");