#################################################### # File: CMOS_psf2d_analysis.lsf # # Description: This file will plot some results from # the frequency sweep object "sweep position" in # CMOS_psf2D.fsp # # Copyright 2011 Lumerical Solutions #################################################### sname = "sweep position"; # image the incoherent source E2_source = getsweepdata(sname,"E2_source"); x_source = getsweepdata(sname,"x_source"); E2_surface = getsweepdata(sname,"E2_surface"); x_surface = getsweepdata(sname,"x_surface"); plotxy(x_source*1e6,E2_source,x_surface*1e6,E2_surface,"x (microns)","|E|^2","Incoherent |E|^2"); legend("source","Si surface"); # image the E field E2 = getsweepdata(sname,"E2"); x = getsweepdata(sname,"x"); y = getsweepdata(sname,"y"); image(x*1e6,y*1e6,E2,"x (microns)","y (microns)","|E|^2"); # get the results for each pixel Pred = getsweepdata(sname,"Pred"); Pgreen = getsweepdata(sname,"Pgreen"); ?"Red/green pixel response:"; ?num2str([Pred,Pgreen]); # calculate MTF x0 = (1:length(Pgreen))*4e-6; spatial_frequency = fftk(x0,2,2^10)/(2*pi); MTF = abs(fft(Pgreen,2,2^10)); MTF=MTF/max(MTF); plot(spatial_frequency*1e-3,MTF,"cycles per mm","MTF");