#################################################### # File: CMOS_lens_sweep_analysis.lsf # # Description: This file will plot the sweep results # of the sweep over lens radius of curvature (roc). # # Copyright 2011 Lumerical Solutions #################################################### #################################################### # Get the desired data from the sweep object # Use the command # ?getsweepdata("ROC_sweep"); # to see the available data sname = "ROC_sweep"; Pg = pinch(getsweepdata(sname,"Pg")); theta = getsweepdata(sname,"angle"); roc = getsweepdata(sname,"roc"); #################################################### # if we want to include a cos(theta) factor # uncomment the lines below #Pg = Pg * meshgridx(cos(theta*pi/180),roc); #Pr = Pr * meshgridx(cos(theta*pi/180),roc); #Pb = Pb * meshgridx(cos(theta*pi/180),roc); #################################################### # simply add the 2 angle responses with a 50% weight weight = [0.5,0.5]; Pg_avg = sum( Pg*meshgridx(weight,roc),1); #################################################### # plot results plot(roc*1e6,Pg_avg,transpose(Pg),"radius of curvature (microns)","OE"); legend("mean","0 degrees","15 degrees");