#################################################### # File: CMOS_angular2D_analysis.lsf # # Description: This file will plot the results of # the parameter sweep in CMOS_angle2D.fsp # Copyright 2011 Lumerical Solutions #################################################### #################################################### # The surface results #################################################### # get the data sname = "sweep angle"; theta = getsweepdata(sname,"theta"); Ptotal = pinch(getsweepdata(sname,"Ptotal")); Pg = pinch(getsweepdata(sname,"Pgreen")); Pr = pinch(getsweepdata(sname,"Pred")); # separate the polarizations and include cos(theta) factor Ptotal_P = pinch(Ptotal,1,1)*cos(theta*pi/180); Ptotal_S = pinch(Ptotal,1,2)*cos(theta*pi/180); Pg_P = pinch(Pg,1,1)*cos(theta*pi/180); Pg_S = pinch(Pg,1,2)*cos(theta*pi/180); Pr_P = pinch(Pr,1,1)*cos(theta*pi/180); Pr_S = pinch(Pr,1,2)*cos(theta*pi/180); Ptotal = 0.5*(Ptotal_S+Ptotal_P); Pr = 0.5*(Pr_S+Pr_P); Pg = 0.5*(Pg_S+Pg_P); # plot the results plot(theta,Ptotal_P,Ptotal_S,Ptotal,"angle (degrees","Optical efficiency (Si surface)"); legend("P","S","unpolarized"); plot(theta,Ptotal,Pg,Pr,max(Ptotal)*cos(theta*pi/180),"angle (degrees","Optical efficiency"); legend("Si surface","Green","Red","Ideal"); #################################################### # The volume results #################################################### Ptotal_volume = pinch(getsweepdata(sname,"Ptotal_volume")); Pg_volume = pinch(getsweepdata(sname,"Pgreen_volume")); Pr_volume = pinch(getsweepdata(sname,"Pred_volume")); # separate the polarizations and include cos(theta) factor Ptotal_volume_P = pinch(Ptotal_volume,1,1)*cos(theta*pi/180); Ptotal_volume_S = pinch(Ptotal_volume,1,2)*cos(theta*pi/180); Pg_volume_P = pinch(Pg_volume,1,1)*cos(theta*pi/180); Pg_volume_S = pinch(Pg_volume,1,2)*cos(theta*pi/180); Pr_volume_P = pinch(Pr_volume,1,1)*cos(theta*pi/180); Pr_volume_S = pinch(Pr_volume,1,2)*cos(theta*pi/180); Ptotal_volume = 0.5*(Ptotal_volume_S+Ptotal_volume_P); Pr_volume = 0.5*(Pr_volume_S+Pr_volume_P); Pg_volume = 0.5*(Pg_volume_S+Pg_volume_P); plot(theta,Ptotal_volume,Pg_volume,Pr_volume,max(Ptotal_volume)*cos(theta*pi/180),"angle (degrees","Optical efficiency"); legend("Si volume","Green (volume)","Red (volume)","Ideal");