# curved_monitor_data.lsf ############################################## # choose component to plot component = 'E2'; # plot E field intensity # obtain data from monitor plane group at 0 degrees and # compare this to the simple power monitor named 'power' # These figures should match, except that the # data resolution may be different. # plot data from group m = 'monitor plane 2'; select(m); runanalysis(m); EH = getresult(m,"EH"); E = EH.E2; E = pinch(E,4,1); # get data for first frequency point u = getdata(m,'u'); v = getdata(m,'v'); image(u*1e6,v*1e6,E,"u (microns)","v (microns)","E intensity"); # plot data from power monitor m = "power"; y=getdata(m,"y"); z=getdata(m,"z"); E_power=getelectric("power"); E_power = pinch(E_power,4,1); # get data for first frequency point image(y*1e6,z*1e6,E_power,"y (microns)","z (microns)","E intensity"); # plot the transmission through the monitor plane at 0 degrees # as a function of frequency should give results consistent # with transmission through the power monitor 'power' # you should see the two converge to the same result as # the number of monitors in 'monitor plane 2' increases m = 'monitor plane 2'; T_dataset = getresult(m,"T"); T = T_dataset.T; f = T_dataset.f; T_power = transmission('power'); plot(f,T,T_power,'frequency (Hz)','Transmission'); legend('monitor plane 2','power'); # obtain data from circular monitor at 0 degrees m = 'curve2'; select(m); set('component',component); runanalysis(m); s = getdata(m,'s'); theta = linspace(0,360,length(s)); E = getdata(m,'field'); E = pinch(E,2,1); plot(theta,E,"angle from vertical (degrees)","","E intensity"); # obtain data from monitor plane at 45 degrees # the two normal axes of the monitor plane are (u,v) m = 'monitor plane'; select(m); runanalysis(m); EH = getresult(m,"EH"); E = EH.E2; E = pinch(E,4,1); # get data for first frequency point u = getdata(m,'u'); v = getdata(m,'v'); image(u*1e6,v*1e6,E,"u (microns)","v (microns)","E intensity"); # plot the transmission through the monitor plane at 45 degrees # as a function of frequency T_dataset = getresult(m,"T"); f = T_dataset.f; T = T_dataset.T; plot(f,T,'frequency (Hz)','Transmission'); legend('monitor plane'); # obtain data from circular monitor at 45 degrees m = 'curve'; select(m); set('component',component); runanalysis(m); s = getdata(m,'s'); theta = linspace(0,360,length(s)); E = getdata(m,'field'); E = pinch(E,2,1); plot(theta,E,"angle from vertical (degrees)","","E intensity");