########################################################################### # usr_farfield_angular.lsf # # Description: # This file shows how to use the analysis group in usr_farfield_symmetry.fsp # to obtain the field strength as a function of angle in the far field # # 1) The far field angular scattering in the x-y, x-z and y-z planes # 2) The far field XY half space, this is only 3D simulation and this calculation can be time consuming # # Copyright 2015, Lumerical Solutions, Inc. ########################################################################### run; # Choose which of the 4 possible analyses you want to do do_polar_plot = 1; # set 0 to not perform this test, 1 to perform the test do_halfspace = 0; # set 0 to not perform this test, 1 to perform the test # Define the resolution for the far field plots polar_plot_res = 21; halfspace_res = 31; # this number will significantly affect the time to run this analysis # Far field polar plot and halfspace if(do_polar_plot & do_halfspace ) { ?" Calculating far field angular distribution and halfspace"; ?" NOTE: This calculation takes time!!"; setnamed("scat_ff", "do polar plot",1); setnamed("scat_ff", "do halfspace",1); setnamed("scat_ff", "halfspace res", halfspace_res); setnamed("scat_ff", "polar plot res", polar_plot_res); runanalysis("scat_ff"); ?" Calculation done!"; }else{ if(do_polar_plot) { ?" Calculating far field angular distribution"; setnamed("scat_ff", "do polar plot",1); setnamed("scat_ff", "do halfspace",0); setnamed("scat_ff", "halfspace res", halfspace_res); setnamed("scat_ff", "polar plot res", polar_plot_res); runanalysis("scat_ff"); } if(do_halfspace) { # only for 3D simulation ?" Calculating far field halfspace"; ?" NOTE: This calculation takes time!!"; setnamed("scat_ff", "do polar plot",0); setnamed("scat_ff", "do halfspace",1); setnamed("scat_ff", "halfspace res", halfspace_res); setnamed("scat_ff", "polar plot res", polar_plot_res); runanalysis("scat_ff"); ?" Calculation done!"; } }