closeall; run; runanalysis; #for large volumes, runanalysis can take a while monitors; select("e_outlined"); m="e_outlined"; x=getdata(m,"x"); y=getdata(m,"y"); z=getdata(m,"z"); f=getdata(m,"f"); E2_outline=getdata(m,"E2"); E2 =getelectric("e_outlined::field"); im_freq=5e14; #which freq to plot at x_plane = 0; # position along x-axis of yz image plane y_plane = 0; # position along y-axis of xz image plane z_plane = 0; # position along z-axis of xy image plane #?size(E2_outline); E2_outline=pinch(E2_outline,4,find(f,im_freq)); E2 =pinch(E2 ,4,find(f,im_freq)); #plot yz plane E2_ol_plot=pinch(E2_outline,1,find(x,x_plane)); E2_plot =pinch(E2 ,1,find(x,x_plane)); image(y*1e6,z*1e6,E2_ol_plot,"y (um)","z (um)","|E|^2 with outline"); image(y*1e6,z*1e6,E2_plot, "y (um)","z (um)","|E|^2"); #plot xy plane E2_ol_plot=pinch(E2_outline,3,find(z,z_plane)); E2_plot =pinch(E2 ,3,find(z,z_plane)); image(x*1e6,y*1e6,E2_ol_plot,"x (um)","y (um)","|E|^2 with outline"); image(x*1e6,y*1e6,E2_plot ,"x (um)","y (um)","|E|^2");