diff --git a/shg/modelocksimul.m b/shg/modelocksimul.m index 2eb0c00..0c6dac7 100644 --- a/shg/modelocksimul.m +++ b/shg/modelocksimul.m @@ -4,7 +4,7 @@ str=['load ' file '.txt'];eval(str); str=['Ls=1e-3*' file '(:,1);'];eval(str); str=['spec=' file '(:,2);'];eval(str); -file='maggio10_1557'; +file='caf2_maggio10_1725'; str=['load ' file '.dat'];eval(str); str=['SHGx=' file '(:,1);'];eval(str); str=['SHGy=' file '(:,2);'];eval(str); @@ -20,8 +20,10 @@ lambda0=0.786; %lunghezza d'onda centrale in micron w0=2*pi*c/lambda0;%pulsazione centrale in fs^-1 kk=1; +%w=(2.122:5e-5*2*pi:2.75);% fs^-1 w=(2.122:5e-5*2*pi:2.75);% fs^-1 + nn=find(Ls<0.6);spec=spec-mean(spec(nn));spec=spec/max(spec); specI=interp1(c./Ls*2*pi,spec,w,'linear',0); specI2=exp(-4*log(2)*(w-w0).^2/Dw^2); @@ -30,13 +32,13 @@ figure(1) plot(w,specI,'.',w,specI2,'.') -L=0; %micron +L=3300; %micron silica e CaF2 % %silica -n0=1.453;%indice di rifrazione -d1nl=-0.01728;%derivata prima di n in lambda micron^-1 -d2nl=0.03988; %derivata seconda di n in lambda micron^-2 -d3nl=-0.2388; %derivata terza di n in lambda micron^-3 +% n0=1.453;%indice di rifrazione +% d1nl=-0.01728;%derivata prima di n in lambda micron^-1 +% d2nl=0.03988; %derivata seconda di n in lambda micron^-2 +% d3nl=-0.2388; %derivata terza di n in lambda micron^-3 % % BK7 % n0=1.511;%indice di rifrazione @@ -45,10 +47,10 @@ d3nl=-0.2388; %derivata terza di n in lambda micron^-3 % d3nl=-0.2877; %derivata terza di n in lambda micron^-3 % % % CaF2 -% n0=1.4306; -% d1nl=-0.0104; -% d2nl=0.0304; -% d3nl=-0.1662; +n0=1.4306; +d1nl=-0.0104; +d2nl=0.0304; +d3nl=-0.1662; % % Calcite ordinario % n0=1.6488; @@ -97,7 +99,9 @@ end toc figure(2) -plot(t,y1) +plot(t,real(y1)) +% i termini y1^4 sono solo additivi, non si considerano, questo genera +% l'"artificio" di una funzione risposta negativa. shg1=4*xcorr(y1.^2,y1.^2)+1*(4*xcorr(y1.^3,y1)+4*xcorr(y1,y1.^3)); dimt=length(t)-1; SHG1=shg1(dimt/2+1:dimt*3/2+1); @@ -109,4 +113,9 @@ SHG1filter=real(ifft(A)); figure(3) % plot(t,SHG1/max(SHG1),t,SHG1filter/max(SHG1filter),SHGx,SHGy) % plot(t,SHG1/max(SHG1)*4.5,t,SHG1filter/max(SHG1filter),'k',SHGx-0.1,SHGy,'r');xlim([-400 400]) -plot(t,SHG1filter/max(SHG1filter),'k',t,exp(-4*log(2)*t.^2/(2^0.5*Dt)^2),'b',SHGx,SHGy,'r');xlim([-400 400]) \ No newline at end of file +plot(t,SHG1filter/max(SHG1filter),'k',t,exp(-4*log(2)*t.^2/(2^0.5*Dt)^2),'b',SHGx,SHGy,'r');xlim([-400 400]) +% plot(t,SHG1/max(SHG1),'r',t,SHG1filter/max(SHG1filter),'k'); +if 0, + AA=[t' (yy-Ybkg)']; str=['save ' filecommon '.dat AA -ascii;'];eval(str); + AA=[t' (SHG1/max(SHG1))' (SHG1filter/max(SHG1filter))']; str=['save shg_simul.dat AA -ascii;'];eval(str); +end; \ No newline at end of file