summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2012-01-11 23:31:03 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2012-01-11 23:31:03 -0500
commite0f605ba9b47796df5c3d44bfbfa0e6008b31427 (patch)
tree9c8a2a001aec5f0fd42575bb39a605802a5bdf51
parent4f8e745c7667ea70e31fb07e2436229d3842088d (diff)
downloadNresonances-e0f605ba9b47796df5c3d44bfbfa0e6008b31427.tar.gz
Nresonances-e0f605ba9b47796df5c3d44bfbfa0e6008b31427.zip
Doppler: pp_I2 symlinked
l---------[-rw-r--r--]xmds2/Nlevels_with_doppler_with_z_4wm/fast_to_slow_switch/pp_I2.m93
-rw-r--r--xmds2/Nlevels_with_doppler_with_z_4wm/pp_I2.m61
2 files changed, 42 insertions, 112 deletions
diff --git a/xmds2/Nlevels_with_doppler_with_z_4wm/fast_to_slow_switch/pp_I2.m b/xmds2/Nlevels_with_doppler_with_z_4wm/fast_to_slow_switch/pp_I2.m
index f632d0a..4a1ed9b 100644..120000
--- a/xmds2/Nlevels_with_doppler_with_z_4wm/fast_to_slow_switch/pp_I2.m
+++ b/xmds2/Nlevels_with_doppler_with_z_4wm/fast_to_slow_switch/pp_I2.m
@@ -1,92 +1 @@
-Nlevels_with_doppler_with_z_4wm
-
-%% field I2 propagation
-z_1=z_1*100; % z in cm
-t_1=t_1*1e6; % time now measured in uS
-figure(1)
-%set(gca,'fontsize',20);
-imagesc(z_1, t_1, I2_out_1); colorbar
-tmin=-0.4;
-tmax= 0.4;
-ylim([tmin,tmax],'manual');
-xlabel('z (cm)')
-ylabel('t (uS)')
-zlabel('I_2')
-title('I_2')
-print('-color','-depsc2', '-tight', '-S200,120', 'fields_propagation_I2.eps')
-
-desired_x_size=200;
-desired_y_size=200;
-xskip=ceil(length(z_1)/desired_x_size);
-yskip=ceil(length(t_1)/desired_y_size);
-map2dat('I2.dat',z_1,t_1, I2_out_1, xskip, yskip);
-
-
-%% field I4 propagation
-figure(2)
-
-imagesc(z_1, t_1, I4_out_1); colorbar
-tmin=-0.4;
-tmax= 0.4;
-ylim([tmin,tmax],'manual');
-xlabel('z (cm)')
-ylabel('t (uS)')
-zlabel('I_2')
-title('I_2')
-print('-color','-depsc2', '-tight', '-S200,120', 'fields_propagation_I4.eps')
-map2dat('I4.dat',z_1,t_1, I4_out_1, xskip, yskip);
-
-
-
-
-
-%% fields before and after the cell
-figure(3)
-%set(gca,'fontsize',30);
-plot( ...
- t_1,I2_out_1(:,1),'.-;I_2 before;', "linewidth", 4 ...
- ,t_1,I2_out_1(:,end), '-;I_2 after;', "linewidth", 4 ...
- ,t_1,I4_out_1(:,end), '-;I_4 after;', "linewidth", 4 ...
- )
-xlabel('t (uS)')
-ylabel('I (1/s)^2')
-title('Fields before and after cell')
-legend('location', 'northeast');
-
-[b, a]=butter(3, 0.05);
-I2_out_after=I2_out_1(:,end);
-I2_out_after_filtered=filtfilt(b,a,I2_out_after);
-settling_time=0.01; %uS
-t_good_indx=t_1> min(t_1 + settling_time);
-[m,max_pos_before]=max(I2_out_1(t_good_indx,1) ); [m,max_pos_after]=max(I2_out_after_filtered(t_good_indx));
-delay_time=t_1(max_pos_after)-t_1(max_pos_before);
-printf('Second field delay time = %f uS\n',delay_time);
-
-%set(gca,'fontsize',40);
-%set (gcf,'paperposition',[0.5 0 2.5,1.5]); % IMPORTANT to shrink eps size for readable fonts
-print('-color','-depsc2', '-tight','-S200,120', 'fields_before_after_cell.eps')
-
-figure(4)
-I2_max_in=max(I2_out_1(t_good_indx,1));
-I2_max_out=max(I2_out_1(t_good_indx,end));
-I4_max_out=max(I4_out_1(t_good_indx,end));
-I2_in_norm=(I2_out_1(:,1))/I2_max_in;
-I2_out_norm=(I2_out_1(:,end))/I2_max_out;
-I4_out_norm=(I4_out_1(:,end))/I4_max_out;
-tmin=-.05;
-tmax=.05;
-indx=(t_1>=tmin & t_1<=tmax); % soom in in time to this region
-plot( ...
- t_1(indx),I2_in_norm(indx),'.-;I_2 before;', "linewidth", 4, ...
- t_1(indx),I2_out_norm(indx), '-;I_2 after;', "linewidth", 4 ...
- ,t_1(indx),I4_out_norm(indx), '-;I_4 after;', "linewidth", 4 ...
- )
-legend('location', 'southeast');
-xlim([tmin,tmax],'manual');
-ylim([0.5,1],'manual');
-xlabel('t (uS)')
-ylabel('I normalized')
-title('Fields before and after cell normalized')
-%set (gcf,'paperposition',[0.5 0 2.5,1.5]); % IMPORTANT to shrink eps size for readable fonts
-print('-color','-depsc2', '-tight','-S200,120', 'fields_before_after_cell_normalized.eps')
-
+../pp_I2.m \ No newline at end of file
diff --git a/xmds2/Nlevels_with_doppler_with_z_4wm/pp_I2.m b/xmds2/Nlevels_with_doppler_with_z_4wm/pp_I2.m
index 9d88f3b..f632d0a 100644
--- a/xmds2/Nlevels_with_doppler_with_z_4wm/pp_I2.m
+++ b/xmds2/Nlevels_with_doppler_with_z_4wm/pp_I2.m
@@ -1,6 +1,6 @@
Nlevels_with_doppler_with_z_4wm
-%% field propagation
+%% field I2 propagation
z_1=z_1*100; % z in cm
t_1=t_1*1e6; % time now measured in uS
figure(1)
@@ -13,33 +13,50 @@ xlabel('z (cm)')
ylabel('t (uS)')
zlabel('I_2')
title('I_2')
+print('-color','-depsc2', '-tight', '-S200,120', 'fields_propagation_I2.eps')
-xskip=1;
-yskip=10;
-%map2dat('I2.dat',z_1,t_1, I2_out_1, xskip, yskip);
+desired_x_size=200;
+desired_y_size=200;
+xskip=ceil(length(z_1)/desired_x_size);
+yskip=ceil(length(t_1)/desired_y_size);
+map2dat('I2.dat',z_1,t_1, I2_out_1, xskip, yskip);
+%% field I4 propagation
+figure(2)
+
+imagesc(z_1, t_1, I4_out_1); colorbar
+tmin=-0.4;
+tmax= 0.4;
+ylim([tmin,tmax],'manual');
+xlabel('z (cm)')
+ylabel('t (uS)')
+zlabel('I_2')
+title('I_2')
+print('-color','-depsc2', '-tight', '-S200,120', 'fields_propagation_I4.eps')
+map2dat('I4.dat',z_1,t_1, I4_out_1, xskip, yskip);
+
-print('-color','-depsc2', '-tight', '-S200,120', 'fields_propagation_I2.eps')
%% fields before and after the cell
-figure(2)
+figure(3)
%set(gca,'fontsize',30);
plot( ...
- t_1,I2_out_1(:,1),'.-;before;', "linewidth", 4, ...
- t_1,I2_out_1(:,end), '-;after;', "linewidth", 4 ...
+ t_1,I2_out_1(:,1),'.-;I_2 before;', "linewidth", 4 ...
+ ,t_1,I2_out_1(:,end), '-;I_2 after;', "linewidth", 4 ...
+ ,t_1,I4_out_1(:,end), '-;I_4 after;', "linewidth", 4 ...
)
xlabel('t (uS)')
-ylabel('I_2 (1/s)^2')
-title('I_2 before and after cell')
-legend('location', 'southwest');
+ylabel('I (1/s)^2')
+title('Fields before and after cell')
+legend('location', 'northeast');
[b, a]=butter(3, 0.05);
I2_out_after=I2_out_1(:,end);
I2_out_after_filtered=filtfilt(b,a,I2_out_after);
-settling_time=0.8; %uS
+settling_time=0.01; %uS
t_good_indx=t_1> min(t_1 + settling_time);
[m,max_pos_before]=max(I2_out_1(t_good_indx,1) ); [m,max_pos_after]=max(I2_out_after_filtered(t_good_indx));
delay_time=t_1(max_pos_after)-t_1(max_pos_before);
@@ -47,25 +64,29 @@ printf('Second field delay time = %f uS\n',delay_time);
%set(gca,'fontsize',40);
%set (gcf,'paperposition',[0.5 0 2.5,1.5]); % IMPORTANT to shrink eps size for readable fonts
-print('-color','-depsc2', '-tight','-S200,120', 'fields_before_after_cell_I2.eps')
+print('-color','-depsc2', '-tight','-S200,120', 'fields_before_after_cell.eps')
figure(4)
I2_max_in=max(I2_out_1(t_good_indx,1));
I2_max_out=max(I2_out_1(t_good_indx,end));
+I4_max_out=max(I4_out_1(t_good_indx,end));
I2_in_norm=(I2_out_1(:,1))/I2_max_in;
I2_out_norm=(I2_out_1(:,end))/I2_max_out;
-tmin=-0.05;
-tmax=0.05;
+I4_out_norm=(I4_out_1(:,end))/I4_max_out;
+tmin=-.05;
+tmax=.05;
indx=(t_1>=tmin & t_1<=tmax); % soom in in time to this region
plot( ...
- t_1(indx),I2_in_norm(indx),'.-;before;', "linewidth", 4, ...
- t_1(indx),I2_out_norm(indx), '-;after;', "linewidth", 4 ...
+ t_1(indx),I2_in_norm(indx),'.-;I_2 before;', "linewidth", 4, ...
+ t_1(indx),I2_out_norm(indx), '-;I_2 after;', "linewidth", 4 ...
+ ,t_1(indx),I4_out_norm(indx), '-;I_4 after;', "linewidth", 4 ...
)
legend('location', 'southeast');
xlim([tmin,tmax],'manual');
+ylim([0.5,1],'manual');
xlabel('t (uS)')
-ylabel('I_2')
-title('I_2 before and after cell normalized')
+ylabel('I normalized')
+title('Fields before and after cell normalized')
%set (gcf,'paperposition',[0.5 0 2.5,1.5]); % IMPORTANT to shrink eps size for readable fonts
-print('-color','-depsc2', '-tight','-S200,120', 'probe_before_after_cell_I2_normalized.eps')
+print('-color','-depsc2', '-tight','-S200,120', 'fields_before_after_cell_normalized.eps')