diff options
-rw-r--r-- | squeezing_filter/circular_perpendicular_results/Makefile | 31 | ||||
-rw-r--r-- | squeezing_filter/circular_perpendicular_results/grand_output.m | 54 |
2 files changed, 85 insertions, 0 deletions
diff --git a/squeezing_filter/circular_perpendicular_results/Makefile b/squeezing_filter/circular_perpendicular_results/Makefile new file mode 100644 index 0000000..144b263 --- /dev/null +++ b/squeezing_filter/circular_perpendicular_results/Makefile @@ -0,0 +1,31 @@ +### -*- make -*- +### This makefile can be used to build and run the XMDS examples + + + +eps_targets = $(wildcard *.eps) +pdf_targets = $(eps_targets:%.eps=%.pdf) +png_targets = $(pdf_targets:%.pdf=%.png) + +pdf: $(pdf_targets) + +$(pdf_targets): %.pdf : %.eps + cat $< | ps2eps -B > __tt.eps + epspdf __tt.eps $@ + rm -f __tt.eps + #ps2eps -B $< | epspdf $< $@ + +png: pdf $(png_targets) + +$(png_targets): %.png : %.pdf + convert -density 300 $< $@ + +clean: + rm -f $(pdf_targets) + rm -f $(png_targets) + +real_clean: clean + rm -f $(eps_targets) + +.PRECIOUS: %.m +.PHONY: all clean diff --git a/squeezing_filter/circular_perpendicular_results/grand_output.m b/squeezing_filter/circular_perpendicular_results/grand_output.m new file mode 100644 index 0000000..b8ac424 --- /dev/null +++ b/squeezing_filter/circular_perpendicular_results/grand_output.m @@ -0,0 +1,54 @@ + +fnames=glob('./*.mat'); + +Nsteps=length(fnames) + +line_colors= [ ... + [ 0, 0, 1]; ... + [ 1, 0, 0]; ... + [ 0, 1, 0]; ... + [ 0, 0, 0]; ... + [ 0, 0.8, 0]; ... + [ 1, 0, 1]; ... + [ 0, 0, .6] ... + ]; + +figure(1); hold off; +legend_str={}; + +% read the information from resulting files +for i=1:Nsteps + d=load(fnames{i}); + detunings=d.detunings; + B_field=d.B_field(1); + xi_left=d.xi_left; + xi_right=d.xi_right; + xi_x=d.xi_x; + xi_y=d.xi_y; + Ep = d.Ep; + Ed=d.Ed; + Ep_out.x = d.Ep_out.x; + Ep_out.y = d.Ep_out.y; + Ep_out.left = d.Ep_out.left; + Ep_out.right = d.Ep_out.right; + + B_str=num2str(B_field(1),"%g"); + B_str=strcat('B= ',B_str, ' G'); + legend_str{i}=B_str; + + figure(1); + plot(detunings, abs(Ep_out.right).^2, 'color', line_colors(i,:) ); hold on + legend(legend_str); + +endfor + + +figure(1); +xlabel('Detuning (MHz)'); +ylabel('Transmission (Arb.Units)'); +title('Signal out right-polarization'); +legend(legend_str); +legend('location', 'south'); +hold off; + +print('-color','-depsc2', '-tight','-S200,120', 'right-polarization_output_vs_detuning.eps') |