1; load '/tmp/xi_vs_detuning.mat' ; Er=(1+I*xi_right)*E_field_pos_freq.right; El=(1+I*xi_left) *E_field_pos_freq.left; Ex=(Er+El)/sqrt(2); Ey=I*(Er-El)/sqrt(2); %extra rotation to compensate rotation due to ellipticity % actually no need for it since x-polarization shifts by positive phase % and y-pol by negative phase %el_rot=0*psi_el; %Ex=cos(el_rot)*Ex-sin(el_rot)*Ey; %Ey=sin(el_rot)*Ex+cos(el_rot)*Ey; Ipos=(abs(Ey).^2)/2; Ineg=(abs(Ex).^2)/2; figure(1); hold off; plot(detuning_freq, real(xi_left-xi_right), '-'); title("differential real xi"); xlabel("two photon detuning"); figure(2); hold off; plot(detuning_freq, imag(xi_left-xi_right), '-'); title("differential imag xi"); xlabel("two photon detuning"); figure(3); hold off; plot(detuning_freq, imag(xi_left), '-', detuning_freq, imag(xi_right), '-'); title("imag xi"); xlabel("two photon detuning"); figure(4); hold off; plot(detuning_freq, real(xi_left), '-', detuning_freq, real(xi_right), '-'); title("real xi"); xlabel("two photon detuning"); figure(5); hold off; plot(detuning_freq, (Ipos-Ineg), '-'); title("BPD signal xi"); xlabel("two photon detuning"); %figure(1); %hold off; %plot(detuning_freq, imag(xi_linear), '-1;linear;'); %hold on; %plot(detuning_freq, imag(xi_left), '-2;left;'); %plot(detuning_freq, imag(xi_right), '-3;right;'); %title("probe absorption"); %hold off; %figure(2); %hold off; %plot(detuning_freq, real(xi_linear), '-1;linear;'); %hold on; %plot(detuning_freq, real(xi_left), '-2;left;'); %plot(detuning_freq, real(xi_right), '-3;right;'); %title("probe dispersion"); %hold off;